I have a simple script called InputManager and (for now) all it does is just to detect whether the mouse is over UI elements or not, just to prevent unwanted behaviors in the game.
- void Update()
- if (EventSystem.current.IsPointerOverGameObject())
- Debug.Log("Its over UI elements");
- Debug.Log("Its NOT over UI elements");
The problem is that the message "Its over UI elements" always shows up in the console, I turned off the canvas just to see if there is something messing with this function but nothing happened, apparently a lot of devs are suffering from the same issue.
Can someone tell me what to do?