Add methods for node reparenting

This commit is contained in:
Tomasz Chabora 2020-02-17 18:29:14 +01:00 committed by kobewi
parent d5d22ab035
commit 2bdd7e9ea0
9 changed files with 50 additions and 0 deletions

View file

@ -604,6 +604,15 @@
Removes a node from a group. See notes in the description, and the group methods in [SceneTree].
</description>
</method>
<method name="reparent">
<return type="void" />
<param index="0" name="new_parent" type="Node" />
<param index="1" name="keep_global_transform" type="bool" default="true" />
<description>
Changes the parent of this [Node] to the [param new_parent]. The node needs to already have a parent.
If [param keep_global_transform] is [code]true[/code], the node's global transform will be preserved if supported. [Node2D], [Node3D] and [Control] support this argument (but [Control] keeps only position).
</description>
</method>
<method name="replace_by">
<return type="void" />
<param index="0" name="node" type="Node" />