0 votes

As suggested by the InputEvent Documentation, I want to use _UnhandledInput to handle inputs when they are not already handled by the GUI.

My Scene looks like this

Scene Graph

The EditorWorld node implements _UnhandledInput (and callsSetProcessUnhandledInput) but the method is never called even when I don't click on a visible control.

UI Scene Graph

Implementing _UnhandledInput on other nodes in the tree does not produce any results either.

I set the mouse filter property of all the transparent controls to both Pass and Ignore but the result is the same. The events are all stopped by the UI layer and never fire the _UnhandledInput method on the rest of the nodes.

Here's a view of the UI scene in the Godot editor. I have added the orange rectangles to show the invisible spacers.

UI Scene Preview

in Engine by (21 points)

1 Answer

+1 vote
Best answer

I managed to solve the issue after more experimentation.

All the "pass through" components and their containers need to have their mouse_filter property set to Ignore.

In the case presented above:

- EditorUI
- EditorUI/Columns
- EditorUI/Columns/Spacer
- EditorUI/Columns/LeftPanel
- EditorUI/Columns/LeftPanel/Stack
- EditorUI/Columns/LeftPanel/Stack/Spacer
- EditorUI/Columns/RightPanel
- EditorUI/Columns/RightPanel/Stack
- EditorUI/Columns/RightPanel/Stack/Control
by (21 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.