Add a signal to notify when children nodes enter or exit tree

-Allows more fine grained notifications (hence better performance) than using the global scene tree signals (node added and removed).
-Required for #55950

(cherry picked from commit fbd9599b04)
This commit is contained in:
reduz
2022-02-02 11:22:11 +01:00
committed by Rémi Verschelde
parent ca432727d9
commit e4e3f7d157
4 changed files with 30 additions and 0 deletions

View File

@@ -718,6 +718,18 @@
</member>
</members>
<signals>
<signal name="child_entered_tree">
<argument index="0" name="node" type="Node" />
<description>
Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it.
</description>
</signal>
<signal name="child_exited_tree">
<argument index="0" name="node" type="Node" />
<description>
Emitted when a child node exits the scene tree, either because it exited on its own or because this node exited.
</description>
</signal>
<signal name="ready">
<description>
Emitted when the node is ready.