|
System.GUID.newGUID() crashes the app, I'm assuming due to the stripping.
(comments are locked)
|
|
I ended up using:
So for the same ID to be generated two of the same device with the same language setting would have to open the game at the exact same time and the devices would both have to request the ID at the exact same time, then both devices would have to generate the same random number.
(comments are locked)
|
|
If System.GUID.newGUID() crashes the environment, I would be tempted to raise that as a software defect as that is what should, in principle, be used. However, if that were not available, consider using a low level timestamp (say ... seconds since Jan 1st 1970). You can get away with this is the ID doesn't have to be guaranteed to be "globally" or "universally" unique. How do you get a timestamp though from unity (without an external WWW call)
May 06 '12 at 02:57 AM
ina
May 06 '12 at 03:17 AM
Bunny83
(comments are locked)
|
|
According to the Mono Compatibility page the Guid class is fully supported on all platforms / Mono versions. Stripping shouldn't be an issue unless you use the micro mscorlib. Are you sure you spelled it correct? It's: So in C# you would do something like: edit Jus FTR for anyone reading in the future, this works perfectly.
Jan 02 at 03:21 PM
Fattie
It may work depending upon your stripping level. If you use Micro mscorlib there are several classes that are stripped. http://docs.unity3d.com/Documentation/Manual/iphone-playerSizeOptimization.html specifically mentions GUIDs.
Apr 15 at 06:39 AM
poday
(comments are locked)
|

for future readers, Unity does all this work for you ...
http://answers.unity3d.com/questions/373055/deviceuniqueidentifier-curiosity-.html