add function

Add GetUniqueCode() to get unique_code in script.