0 votes

I'd like to keep some nodes loaded into memory but not have them do anything. I know turning off their visibility literally just makes them invisible and doesn't help at all.

I've wondered if temporarily turning them into orphan nodes would work, but it sounds like a bad thing to do.

in Engine by (25 points)

3 Answers

0 votes
Best answer

Have you tried using set_process(false)?

by (49 points)
selected by

This seems to do the trick for nodes that have scripts attached, at least. I need to call it as a deferred function to make it work half the time though, but okay.

–1 vote

you can have them paused and when you need them you can unpause them

by (289 points)
0 votes

For Godot 4, see https://github.com/godotengine/godot-proposals/issues/1835

Code: node.set_process_mode(PROCESS_MODE_DISABLED) (see doc for other process modes)

Editor: select node, scroll to the bottom of the inspector and modify the Mode property via dropdown to the same enum values as in code

changing node process mode in editor

by (48 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 Frequently asked questions and 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 [email protected] with your username.