Forum rules - please read before posting.

MissingReferenceException after loading a save file.

In Settings Manager, I had checked "Always reload scene when loading a save file?". So when I load a save file from inside the game, I get this error when trying to run an associated ActionList.

MissingReferenceException: The object of type 'Cutscene' has been destroyed but you are still trying to access it.


Code: http://pasteall.org/1477129/objc

The ActionList are in the scene. This error only happens when the loaded save file loads same scene as the one I'm currently in.
If I am in Scene A, and the load file takes me to Scene B everything works. But if I'm Scene A and the load files reloads Scene A, then this error happens

Comments

  • You're assigning your listener in Start, but not clearing it from last time. Before adding the listener:

    _button.uiButton.onClick.RemoveAllListeners ();
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.