Merge pull request #30162 from KoBeWi/doc-ready
Clarify docs for _ready and request_ready
This commit is contained in:
commit
9adc158097
1 changed files with 2 additions and 1 deletions
|
@ -85,6 +85,7 @@
|
||||||
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
|
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
|
||||||
Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables.
|
Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables.
|
||||||
Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree].
|
Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree].
|
||||||
|
[b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding again, [code]_ready[/code] will not be called for the second time. This can be bypassed with requesting another call with [method request_ready], which may be called anywhere before adding the node again.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="_unhandled_input" qualifiers="virtual">
|
<method name="_unhandled_input" qualifiers="virtual">
|
||||||
|
@ -595,7 +596,7 @@
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Requests that [code]_ready[/code] be called again.
|
Requests that [code]_ready[/code] be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see [method _ready]). [code]_ready[/code] is called only for the node which requested it, which means that you need to request ready for each child if you want them to call [code]_ready[/code] too (in which case, [code]_ready[/code] will be called in the same order as it would normally).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="rpc" qualifiers="vararg">
|
<method name="rpc" qualifiers="vararg">
|
||||||
|
|
Loading…
Reference in a new issue