Fix reparent losing owner if relationship to original owner is not broken

This commit is contained in:
twobit 2023-09-10 00:09:24 -04:00
parent fc99492d30
commit b4aa6ad36e
2 changed files with 34 additions and 2 deletions

View file

@ -679,7 +679,7 @@
<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.
Changes the parent of this [Node] to the [param new_parent]. The node needs to already have a parent. The node's [member owner] is preserved if its owner is still reachable from the new location (i.e., the node is still a descendant of the new parent after the operation).
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>