- Home /
Question by
Brainshack · Mar 30 at 08:33 PM ·
uiinput
EventSystem.current.IsPointerOverGameObject() always returns true with new INput System and UI elements
So I am trying to use the new UI Toolkit with the new input system. My UI Buttons work, but they also trigger events in my GameObject scripts.
I am using event polling like this:
if (confirmPlacementAction.action.WasPressedThisFrame())
{
ConfirmPlacement();
}
Inside Confirmplacement I try to check wether the mouse is over the UI:
if (!EventSystem.current.IsPointerOverGameObject()) return;
But this always returns true, so it always thinks its over a UI Panel. What am I missing here?
Comment