this is the script attached to my bird but the problem is, I also have a pause button on the top right of my screen and whenever I click the pause button, the bird jumps too… is there a way of tagging the button or some function I could use so that this doesnt happen?
A pseudo code i’m after looks something like
if(input.getmousebuttondown(0) && isNotaButton) then jump.
Put a giant invisible Image on Canvas that covers the whole screen (but behind other UI elements).
Add an EventTrigger to that thing, that intercepts the events you care about (PointerDown in this case), and calls some event on your game controller (like Flap() in your bird controller).
Because the image is behind everything else, it (and so your flappy bird) will only get the event when some higher UI element (e.g. the Pause button) doesn’t handle it first.