Author Topic: Adding COMPONENT BUG!!  (Read 2192 times)

basil_11

  • Guest
Adding COMPONENT BUG!!
« 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.
« Last Edit: January 31, 2013, 04:00:29 AM by basil_11 »

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Adding COMPONENT BUG!!
« Reply #1 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.