I have a Area2D that uses signals to detect mouse_entered() and mouse_exited() (Im printing when a function is activated into the console)
When the UI Elements are activated this does not work anymore.
Some of the UI Elements cover the entire screen, somehow they block the Area2D from noticing the cursor.
The z-index of my UI stuff is 100, I think, so the Area2D is below it, but I don’t want it to block the Area2D.
(Also, the debug prints are not in scripts attached to an UI element)
As explained in the documentation here CanvasItem.z_index only affect the drawing order on Control nodes. The input is still following the scene tree order.
If you want to know which Control is consuming the event then try clicking on it while the game is running and check the Misc tab in the Debugger dock. Check if Last Clicked Control field shows anything. If it does, set that control Control.mouse_filter to Ignore and repeat.
Fixed it.
I marked every single Control Element and set its ‘Mouse Filter’ to ‘Pass’.
I originally thought the ‘Mouse Filter’ Property was going to inherit its way down to the relevant elements, it does not.