浏览代码

Merge pull request #34322 from rainlizard/set_script-variables

set_script() detailing what happens to variables
Rémi Verschelde 5 年之前
父节点
当前提交
c3af23ff5e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      doc/classes/Object.xml

+ 1 - 0
doc/classes/Object.xml

@@ -460,6 +460,7 @@
 			</argument>
 			</argument>
 			<description>
 			<description>
 				Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
 				Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
+				If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [method _init] method will be called.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="to_string">
 		<method name="to_string">