- Home /
Question by
dcarpiom1985 · Mar 28, 2015 at 04:44 PM ·
uiinputbuttongetmousebutton
Problems with Inputs
Hi!
I do a jump game. All works fine with a exception. I put a pause button (UI button in a panel) and when press the pause button before pause game, the player jump because the player jumps with the input.getmouse(0).
How should I solve this problem?
Comment
Answer by GiggleSquid · Mar 29, 2015 at 02:50 AM
You could just change the player jump key/button to space or something? Or if you really want the player to jump with mouse button 0 you could write and if statement in Update(), something along the lines of:
if (Input.GetMouseButtonDown (0) && UI_BUTTON){
Don't run Jump script
}
Sorry I can't be of more help, not a master of C# or Unity if you can't tell xD
Your answer
![](https://koobas.hobune.stream/wayback/20220613191454im_/https://answers.unity.com/themes/thub/images/avi.jpg)