So i found a bug with InteractWithUI(), when i start the game from scene 2 instead of scene 1 i get a NullReferenceException: Object reference not set to an instance of an object for the InteractWithUI() section of the player controller. And it disables my ability to click or anything. I’ve checked my code but but seems to be correct.
private bool InteractWithUI()
{
if (EventSystem.current.IsPointerOverGameObject())
{
SetCursor(CursorType.UI);
return true;
}
return false;
}