Continuing the discussion from Error after completing Cursor Lectures [HELP]:
I think I have the same issue mschoenhals has.
Sadly the solution was not shared
When I move into a portal and the game loads a new scene, I get tons and tons of NullReference Exceptions:
NullReferenceException: Object reference not set to an instance of an object
RPG.Control.PlayerController.HandleUI () (at Assets/Scripts/Control/PlayerController.cs:67)
RPG.Control.PlayerController.Update () (at Assets/Scripts/Control/PlayerController.cs:45)
private bool HandleUI()
{
if(EventSystem.current.IsPointerOverGameObject()) // only refers to UI! not to other elements in the world
{
SetCursor(CursorType.UI);
return true;
}
return false;
}
the offending line being the if statement.
Scene 0 (working)
Scene 1 (broken)
I did some more digging. It definitely is the if statement itself that is causing the issue.
not the body, the statement itself.
EventSystem.current.IsPointerOverGameObject() seems to run into an issue…