New input system and using touch over GUI elements
Hey guys, so I'm using a touch to make my character jump, I've bound it to Touchscreen Press. In my code, Im getting a reference for PlayerInputActions and adding a callback when Jump is performed. This works with the touch press just fine, but I added a pause button inside my game scene and pressing it also triggers the jump, which is not what I want. I've looked around a bit and I've tried the EventSystem.current.IsPointerOverGameObject()
but I think for my case I need to pass the id of the touch, so my question is how do I get that or how else would I go about preventing the jump happening if I'm pressing on the pause button?
Your answer
![](https://koobas.hobune.stream/wayback/20220613042626im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
With the new unity input system. How do I setup UI buttons like in the old system. 0 Answers
Joystick buttons don't work 0 Answers
using a button witout pressing it ? 1 Answer
How do i make up and down button script for Mobile in Unity 5.3.2 0 Answers
Is it possible to get the screen rect for a button regardless of its parent? 1 Answer