summaryrefslogtreecommitdiff
path: root/doc/classes/Node.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Node.xml')
-rw-r--r--doc/classes/Node.xml47
1 files changed, 34 insertions, 13 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index e8913f2623..7750d45226 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -128,7 +128,7 @@
</argument>
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
[b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
[codeblocks]
[gdscript]
@@ -158,8 +158,8 @@
<argument index="1" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Adds a [code]sibling[/code] node to current's node parent, at the the same level as that node, right below it.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
</description>
</method>
@@ -179,7 +179,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the node can process while the scene tree is paused (see [member pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
+ Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -245,6 +245,12 @@
Returns an array of references to node's children.
</description>
</method>
+ <method name="get_editor_description" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_groups" qualifiers="const">
<return type="Array">
</return>
@@ -623,10 +629,11 @@
</return>
<argument index="0" name="node" type="Node">
</argument>
- <argument index="1" name="keep_data" type="bool" default="false">
+ <argument index="1" name="keep_groups" type="bool" default="false">
</argument>
<description>
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
+ If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in.
</description>
</method>
<method name="request_ready">
@@ -756,6 +763,14 @@
Sets the folded state of the node in the Scene dock.
</description>
</method>
+ <method name="set_editor_description">
+ <return type="void">
+ </return>
+ <argument index="0" name="editor_description" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_network_master">
<return type="void">
</return>
@@ -867,8 +882,8 @@
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using [PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing.
</member>
- <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0">
- Pause mode. How the node will behave if the [SceneTree] is paused.
+ <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Node.ProcessMode" default="0">
+ Can be used to pause or unpause the node, or make the node paused based on the [SceneTree], or make it inherit the process mode from its parent (default).
</member>
<member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first.
@@ -1016,14 +1031,20 @@
<constant name="NOTIFICATION_TEXT_SERVER_CHANGED" value="2018">
Notification received when text server is changed.
</constant>
- <constant name="PAUSE_MODE_INHERIT" value="0" enum="PauseMode">
- Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default.
+ <constant name="PROCESS_MODE_INHERIT" value="0" enum="ProcessMode">
+ Inherits process mode from the node's parent. For the root node, it is equivalent to [constant PROCESS_MODE_PAUSABLE]. Default.
+ </constant>
+ <constant name="PROCESS_MODE_PAUSABLE" value="1" enum="ProcessMode">
+ Stops processing when the [SceneTree] is paused (process when unpaused). This is the inverse of [constant PROCESS_MODE_WHEN_PAUSED].
+ </constant>
+ <constant name="PROCESS_MODE_WHEN_PAUSED" value="2" enum="ProcessMode">
+ Only process when the [SceneTree] is paused (don't process when unpaused). This is the inverse of [constant PROCESS_MODE_PAUSABLE].
</constant>
- <constant name="PAUSE_MODE_STOP" value="1" enum="PauseMode">
- Stops processing when the [SceneTree] is paused.
+ <constant name="PROCESS_MODE_ALWAYS" value="3" enum="ProcessMode">
+ Always process. Continue processing always, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_DISABLED].
</constant>
- <constant name="PAUSE_MODE_PROCESS" value="2" enum="PauseMode">
- Continue to process regardless of the [SceneTree] pause state.
+ <constant name="PROCESS_MODE_DISABLED" value="4" enum="ProcessMode">
+ Never process. Completely disables processing, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_ALWAYS].
</constant>
<constant name="DUPLICATE_SIGNALS" value="1" enum="DuplicateFlags">
Duplicate the node's signals.