Reputation: 1958
Is it possible to invoke a function or connect a signal when the tree is unpaused?
for example I have this setup:
the world script:
extends Node2D
func _ready():
get_tree().paused=true
# do something
get_tree().paused=false
the thing script:
extends Node2D
func _unpaused():
# reset something when the tree is unpaused
is something like this possible?
Upvotes: 0
Views: 229
Reputation: 40315
No, I can't find a signal or virtual method for that.
I'd say use an autoload that controls paused
, and make sure everything on the projects that needs paused
goes through the autoload. So the autoload can do whatever you need when it changes.
Upvotes: 1