- Home /
Question by
jesalpatelweb · Jun 23, 2019 at 07:17 AM ·
androidunity 5unity 2dmobile devices
How can I stop input from registering inside my game when I am dragging status bar from the top?
Basically on newer phones such as the ones with the notch at the top I have been able to play games where I swipe the top of my screen to access the status bar without any input impacting my game.
Games such as Circle and Jelly Jump) are examples that do this.
I basically want a similar sort of thing. Right now when I drag down my status bar from the top, my game ends up activating which is something I don't want.
My code to start the game is upon a very simple mouse down input which also registers as a touch on phones:
if (Input.GetMouseButtonDown(0)) { Jump(); }
An example of what I want can be shown via this diagram I've drawn here.
Comment