浏览代码

Clarify that replace_by keeps child nodes in tree

(cherry picked from commit 98a3948bf9944c0f2003d46997c74bbc7b14d909)
cdemirer 3 年之前
父节点
当前提交
8e29a37800
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      doc/classes/Node.xml

+ 2 - 1
doc/classes/Node.xml

@@ -521,7 +521,8 @@
 			<argument index="1" name="keep_data" type="bool" default="false" />
 			<argument index="1" name="keep_data" type="bool" default="false" />
 			<description>
 			<description>
 				Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
 				Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
-				Note that the replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free].
+				[b]Note:[/b] The given node will become the new parent of any child nodes that the replaced node had.
+				[b]Note:[/b] The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="request_ready">
 		<method name="request_ready">