0 votes

Greetings Godot Community!

I wanted to know if there is a way to have consistent listener (in this case for input) that runs independently from a scene. Kinda like an overlay.
Because I dont have a player instance or sth like that which could do it.

Thanks in advance!

in Engine by (71 points)

1 Answer

+1 vote
Best answer

You should do an "autoload" singleton script. Write a script and find the "autoload" option in project config. This kind of script will be in the top of the scenetree, it will be independent of the scene (but it instantiate their own node if inherits object), and be unique.

by (331 points)
selected by

That was it. Thank you :)

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.