Created
July 31, 2016 15:56
-
-
Save arashrasoulzadeh/a529b3cd2d58faaea63ac96b54780d48 to your computer and use it in GitHub Desktop.
returnUniqueID of device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<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