touch of the screen interacts along with buttons on the screen

Hello everyone,

Right now im doing a mobile where user clicks on the screen and the player jumps and it is working perfectly but comes with the pause button , i have placed the pause button to left top corner. so when i click on the pause button the player also jumps and for pause button i have been using onclick function(new GUI). For Player jump im using "Input.touchcount == 1 ", pervious i have used “input.getbutton(“Fire1”)” and also added this line “EventSystem.current.IsPointerOverGameObject ()”. so that it differs from button click and on screen click and it works fine on Computer but not in mobile . so can any one suggest me a solution to this. Thank you.

Input.GetButtonDown() triggers on a mouse click, regardless of where are you clicking on screen.

Better way is to create a transparent panel behind the pause button and add button component for your jump functionality.