c# - Giving objects unique ids onStart -


i have bunch of gameobjects assigning unique ids in start function.

void start() {     uniqueid = string.format("{0:x}", datetime.now.ticks); } 

i thought work every , duplicate ids. how can make sure unique?

unity provide unique id every object instance, have @ getinstanceid.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -