exit_tree signal not calling when my node child is cleared .

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kuldeep Mourya

exit_tree signal not working


how can I solve this?

:bust_in_silhouette: Reply From: Zylann

The exit_tree signal does not exist anymore. It was replaced in Godot 3 by tree_exiting and tree_exited:


Also, this is wrong code to connect signals, the 3rd argument should be a string. I don’t know what spawn_and_move returns, but you probably intented this instead:

# Will call spawn_and_move() when new_ground has exited the tree
new_ground.connect("tree_exited", self, "spawn_and_move")

Wow, Thank you so much finally solved! <3

kuldeep Mourya | 2020-04-10 19:04