Hi community, I was trying to create a small game using what I learnt from the Unity course when I ran into this issue. When mouse click is set up for player input (new input system) as well as UI button, a click on the button triggers both player input as well as the UI button. I wonder if there is a neat way to prioritize UI button click over player input click so I can disable player input in the button click event. Please let me know if more information is needed.
Fixed by adding the following check in player input callback function
if (EventSystem.current.IsPointerOverGameObject())
return;
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.