1
Support / Reloading scene destroys UI camera of tk2dUIManager
« on: August 21, 2013, 04:04:32 pm »
Whenever I reload the scene using Application.LoadLevel(Application.loadedLevel) the UI camera of my Tk 2D UIManager becomes missing.
Here's the error message:
MissingReferenceException: The object of type 'Camera' 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.
UnityEngine.Camera.ScreenPointToRay (Vector3 position) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/UnityEngineCamera.cs:376)
tk2dUIManager.CheckInputs () (at Assets/TK2DROOT/tk2dUI/Code/Core/tk2dUIManager.cs:388)
tk2dUIManager.Update () (at Assets/TK2DROOT/tk2dUI/Code/Core/tk2dUIManager.cs:236)
The game will still run but the error persists.
Here's the error message:
MissingReferenceException: The object of type 'Camera' 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.
UnityEngine.Camera.ScreenPointToRay (Vector3 position) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/UnityEngineCamera.cs:376)
tk2dUIManager.CheckInputs () (at Assets/TK2DROOT/tk2dUI/Code/Core/tk2dUIManager.cs:388)
tk2dUIManager.Update () (at Assets/TK2DROOT/tk2dUI/Code/Core/tk2dUIManager.cs:236)
The game will still run but the error persists.