- Home /
InstanceID Changing When Game Start
I've just noticed that InstanceID are not fixed for an object when the game is running and when it is not. My guess is the ID get messed up when Unity creates in-game object.
This is quite annoying. Is there a way to do the matching between ID of object while the game is running and while it is not? Is there any way to pick an object while the game is running and retrieve it while it is not?
Answer by DuckOfDoom · Oct 08, 2015 at 09:13 AM
Since object is instantiated when game starts, it gets new InstanceID. Can't help it.
For the same reason you can't apply prefabs or save scene while in play mode.
Your answer
Follow this Question
Related Questions
NullReference Exception when adding a class 2 Answers
Pause menu error NullReferenceException:Object reference not set to an instance of an Object .js 1 Answer
Object reference not set to an instance of an object. 0 Answers
Object reference not working 0 Answers
NullReferenceException:"Object reference not set to an instance object" 1 Answer