Mobile input problem

I am making a mobile input script, as a reference, I am using the official tutorial.
I made a “button” script, it’s going to be for PC and mobile at the same time.
But the touch is registered for every script in a scene, even I am not on top of the button.
Now I know I have to make a single script for all UI elements, I just don’t know how to detect which one I am pressing

Hi @Dava,

Instead of adding touch input to app which responds to input events fired on all of the appi window, add them directly to your button element.

Check this tutorial on how that works:

1 Like