- Home /
MissingReferenceException: The object of type 'ConversationController' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.
Hi, I encountered this problem when I tried switching to another Scene and after a while I went back again to previous Scene
I have a script that creates a GameObject and add a Component to it,, since upon switching to another scene, Objects and components are destroyed and trying to load the other scene which dynamically recreate the game objects and add components to every scene with the same name that is previously destroyed..
then after that i got this error
MissingReferenceException: The object of type 'ConversationController' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.
Answer by gheeler · Jan 31, 2013 at 01:43 PM
you can keep an object between scenes i believe using object.DontDestroyOnLoad
http://docs.unity3d.com/Documentation/ScriptReference/Object.DontDestroyOnLoad.html
I also get this error, but it is of type "game object", when using DontDestroyOnLoad. What's the purpose of not destroying it if it is still recognized as destroyed when you come back to the level AND it also instantiates a copy of the original object?
Your answer
Follow this Question
Related Questions
Object Reference Not Set As Instance error from ngui code 1 Answer
Need help working with NGUI progress bar 2 Answers
Distribute terrain in zones 3 Answers
panel hide and show in NGUI 1 Answer
Multiple Cars not working 1 Answer