浏览代码

update _init() description

Specify details regarding required parameters.

(cherry picked from commit 21fc3cbe8139b150047f5598760d12c65da90007)
zacryol 3 年之前
父节点
当前提交
3fe37f9635
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      doc/classes/Object.xml

+ 2 - 1
doc/classes/Object.xml

@@ -44,7 +44,8 @@
 		<method name="_init" qualifiers="virtual">
 			<return type="void" />
 			<description>
-				Called when the object is initialized.
+				Called when the object is initialized in memory. Can be defined to take in parameters, that are passed in when constructing.
+				[b]Note:[/b] If [method _init] is defined with required parameters, then explicit construction is the only valid means of creating an Object of the class. If any other means (such as [method PackedScene.instance]) is used, then initialization will fail.
 			</description>
 		</method>
 		<method name="_notification" qualifiers="virtual">