Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: basil_11 on January 31, 2013, 03:30:29 AM

Title: Adding COMPONENT BUG!!
Post by: basil_11 on January 31, 2013, 03:30:29 AM
Hi,
  I just encountered error in adding a component >:(

  scenario :
 
  I have 2 scenes in my game and currently using playing the 1st scene
 now, I loaded to the 2nd scene and all of my attached components are all destroyed upon switching to the other scene
then suddenly, I went back to the 1st scene and 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."

but since I reCreated the Object upon loading I shouldn't get that error.
Title: Re: Adding COMPONENT BUG!!
Post by: Nicki on January 31, 2013, 04:25:28 AM
Sounds like you have a reference in something that doesn't get unloaded with the scene change; maybe a static reference, or a gameobject with DontDestroyOnLoad.

Look at what actually tries to access the missing reference.