UI Buttons dont react on click

Hello everyone,

I have multiple canvas’s in my scene, but everything worked fine before. Now if I click on any buttons, nothing happens. I’ve already checked the Eventsystem-Log and it says that I clicked the button ive clicked, but my Debug.Log entry doesn’t show up in the console.
If I disable my Player-Object everything works fine. I can’t find out what I did wrong.

Maybe you should know that is use “Input.ResetInputAxes()” everytime the play shouldn’t do any inputs. When I enable the Menu where the button is, Timescale is set to 0f but this worked before, too.

Raycast is acitve, nothing seems to block my buttons, the react if I hover over them. Maybe some has an idea what’s causing the issue.

Thank you in advance if you try to help!

Note: I’ve checked several other questions but any answer there unfortunately couldn’t help me.

EDIT: I just saw that “eligibleForClick” will set to True and stays true. On a different canvas it just stays false. Maybe you can use this information.

EDIT 2: After a few tests I’ve figured out that the buttons work if I disable my boundary object - a simple cube which deletes every game object OnTriggerExit (Destroy(other.gameObject)). This object is connected to my player. However I had this game object before where everything worked. If I disable it my buttons work but OnMouseDown etc won’t.

Check if you have another canvas in front of the one with the buttons that has a GraphicRaycaster component attached. If blocking mask is set to Everything it will block everything that is rendered under that canvas.

Make sure your canvas has EventSystem.

So I still don’t know why this error occurred even if I didn’t change much, I figured out that a Trigger Collider was blocking my inputs. As a solution I simply deactivate this trigger box if I open any menus. Thank you all trying to help me.

old question, but for the record/completeness:
hierarchy order of UI elements matters!
objects lower in the hierarchy get drawn later (on top of everything above them in hierarchy), and also get the events sooner! (rendering happens back-to-front, event propagation happens front-to-back)
meaning if you have a button, and below it in hierarchy you have a panel that covers the button, even if the panel is invisible (not disabled as an object, just no image and zero alpha on background color), it will still recieve, and therefore block propagation of pointer events .

if you want to prevent this, either remove GraphicRaycaster from the element (if it is a Canvas and therefore has one), or change its blocking mask to ignore a certain layer and put the element that does the blocking on that layer to stop it from doing the blocking, OR put a CanvasGroup component on the object/UI element that does the blocking and uncheck both “Interactable” and “BlocksRaycasts”