Skip to content

Instantly share code, notes, and snippets.

@arashrasoulzadeh
Created July 31, 2016 15:56
Show Gist options
  • Save arashrasoulzadeh/a529b3cd2d58faaea63ac96b54780d48 to your computer and use it in GitHub Desktop.
Save arashrasoulzadeh/a529b3cd2d58faaea63ac96b54780d48 to your computer and use it in GitHub Desktop.
returnUniqueID of device
///<summary>
///<para>returns unique id of device </para>
///</summary>
public static String returnUniqueID (bool base64)
{
if (base64) {
username = UnityEngine.SystemInfo.deviceUniqueIdentifier;
byte[] bytesToEncode = System.Text.Encoding.UTF8.GetBytes (username);
return Convert.ToBase64String (bytesToEncode);
} else {
return UnityEngine.SystemInfo.deviceUniqueIdentifier;
}
}
//baraye base64 , vorodi ro true bedin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment