+1 vote

Hello,

I pause the game using

get_tree().paused

but I noticed that some nodes aren't getting paused - specifically the nodes that aren't initially present in the scene tree and get instanced at runtime.

Is there a way to update gettree() to pause all the new nodes so I don't have to go in every prefab and write a script to set it to PAUSEMODE_STOP?

Thank you.

Godot version v3.2.3.stable.official
in Engine by (71 points)

2 Answers

+1 vote
Best answer

Nevermind, I fixed it : I was running the pause script on the root node, which was set to process mode. All its childern are set to inherit mode, so they were running in process mode and were not pausing correctly.

Now, I've set the root node back to inherit mode and moved the pause code to a separate node and it now seems to be working correctly.

by (71 points)
0 votes

Hi,
if the pause mode of a node is "inherit" it should stop when the parent stops.

https://docs.godotengine.org/en/stable/tutorials/misc/pausing_games.html

are you sure that non of the parents are set to "process"?

by (3,878 points)

Done
enter image description here

Nothing happens when I click on "tree"

you have to click the object id to get the inspector for the tree

I think it's bugged, it displays for like 1 frame in the inspector then nothing

I just downloaded the latest version
Here's the tree debug info:
enter image description here

Nevermind I fixed it

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.