Forum rules - please read before posting.

UIs not added to scenes after upgrading

edited June 2017 in Technical Q&A
I just updated to the latest version of Unity, and also updated my project to the latest version of AC.

Now whenever I switch to a new scene, I get this error:

MissingReferenceException: The object of type 'Canvas' 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.
AC.PlayerMenus.UpdateMenuPosition (AC.Menu menu, Vector2 invertedMouse) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:614)
AC.PlayerMenus.UpdateMenu (AC.Menu menu, Boolean justPosition) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:908)
AC.PlayerMenus.UpdateAllMenus () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1915)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:350)

Menus work fine on the scene that I pressed play on. It's only when switching to a new scene that error comes up.

Thanks

Comments

  • edited June 2017
    Update with more info:

    The problem is that the UIs are not being added to the scene at all. That specific error is complaining because of the Hotspot UI which is trying to follow the mouse but can't because the Hotspot canvas doesn't exist.

    But the root problem is that none of the UIs exist. They aren't being added when switching scenes.
  • Are you using scene folders?  If so, try removing the _UI folder so that they aren't automatically parented to it.  Does that make a difference?
  • Yes. That works. Thank you. So I should remove that folder from all my scenes?
  • It's a critical bug, so I'm pushing out an immediate fix.
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.