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.xml9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 8f66c9df38..2e8b76865d 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -17,7 +17,8 @@
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos.
</description>
<tutorials>
- <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link>
+ <link title="Scenes and nodes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link>
+ <link title="All Demos">https://github.com/godotengine/godot-demo-projects/</link>
</tutorials>
<methods>
<method name="_enter_tree" qualifiers="virtual">
@@ -194,6 +195,7 @@
Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]).
[b]Note:[/b] It does not match against the full path, just against individual node names.
If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
+ [b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [method get_node] instead. To avoid using [method find_node] too often, consider caching the node reference into a variable.
</description>
</method>
<method name="find_parent" qualifiers="const">
@@ -204,6 +206,7 @@
<description>
Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]).
[b]Note:[/b] It does not match against the full path, just against individual node names.
+ [b]Note:[/b] As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using [method get_node] instead. To avoid using [method find_parent] too often, consider caching the node reference into a variable.
</description>
</method>
<method name="get_child" qualifiers="const">
@@ -213,6 +216,7 @@
</argument>
<description>
Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.
+ Negative indices access the children from the last one.
To access a child node via its name, use [method get_node].
</description>
</method>
@@ -522,7 +526,7 @@
┠╴Menu
┃ ┠╴Label
┃ ┖╴Camera2D
- ┖-SplashScreen
+ ┖╴SplashScreen
┖╴Camera2D
[/codeblock]
</description>
@@ -830,6 +834,7 @@
</member>
<member name="name" type="StringName" setter="set_name" getter="get_name">
The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.
+ [b]Note:[/b] Auto-generated names might include the [code]@[/code] character, which is reserved for unique names when using [method add_child]. When setting the name manually, any [code]@[/code] will be removed.
</member>
<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.