Who consumed my click?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By avnih

Tl;dr: is there a way to know which node consumed the mouse click event?

Rational: In my game I’m using multiple canvas layers, viewports, pauses, etc and I’m facing repeating situations in which I click on a node - but the node doesn’t react. I assume someone else consumed the click event. Is there a way to trace it?

That would be useful
I don’t think there’s a way but I hope I’m wrong
until then I’m using print()s and guessing :confused:

1234ab | 2021-04-16 12:44

:bust_in_silhouette: Reply From: exuin

In the debugger, there’s a Misc tab that has “Clicked Control”. This only works for Control nodes, though. If it’s not a Control node that’s consuming the event, you can follow this diagram to see what node is. The only nodes that can consume the event before a Control node are nodes with _input functions, so you can look for nodes that have those.


The diagram is from this article.

Thank you, I didn’t know about this debugger tab.
I ended up using print calls to follow the diagram.

avnih | 2021-04-16 16:10