summaryrefslogtreecommitdiff
path: root/doc/classes/NodePath.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/NodePath.xml')
-rw-r--r--doc/classes/NodePath.xml58
1 files changed, 20 insertions, 38 deletions
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 817ccd5160..d05630d277 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -20,32 +20,28 @@
@"/root/Main" # If your main scene's root node were named "Main".
@"/root/MyAutoload" # If you have an autoloaded node or scene.
[/codeblock]
+ [b]Note:[/b] In the editor, [NodePath] properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime.
</description>
<tutorials>
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<methods>
<method name="NodePath" qualifiers="constructor">
- <return type="NodePath">
- </return>
+ <return type="NodePath" />
<description>
Constructs an empty [NodePath].
</description>
</method>
<method name="NodePath" qualifiers="constructor">
- <return type="NodePath">
- </return>
- <argument index="0" name="from" type="NodePath">
- </argument>
+ <return type="NodePath" />
+ <argument index="0" name="from" type="NodePath" />
<description>
Constructs a [NodePath] as a copy of the given [NodePath].
</description>
</method>
<method name="NodePath" qualifiers="constructor">
- <return type="NodePath">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
+ <return type="NodePath" />
+ <argument index="0" name="from" type="String" />
<description>
Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent.
The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested.
@@ -67,8 +63,7 @@
</description>
</method>
<method name="get_as_property_path" qualifiers="const">
- <return type="NodePath">
- </return>
+ <return type="NodePath" />
<description>
Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node).
[codeblocks]
@@ -90,8 +85,7 @@
</description>
</method>
<method name="get_concatenated_subnames" qualifiers="const">
- <return type="StringName">
- </return>
+ <return type="StringName" />
<description>
Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path.
[codeblocks]
@@ -107,10 +101,8 @@
</description>
</method>
<method name="get_name" qualifiers="const">
- <return type="StringName">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
+ <return type="StringName" />
+ <argument index="0" name="idx" type="int" />
<description>
Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]).
[codeblocks]
@@ -130,18 +122,15 @@
</description>
</method>
<method name="get_name_count" qualifiers="const">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Gets the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included.
For example, [code]"Path2D/PathFollow2D/Sprite2D"[/code] has 3 names.
</description>
</method>
<method name="get_subname" qualifiers="const">
- <return type="StringName">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
+ <return type="StringName" />
+ <argument index="0" name="idx" type="int" />
<description>
Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]).
[codeblocks]
@@ -159,40 +148,33 @@
</description>
</method>
<method name="get_subname_count" qualifiers="const">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path.
For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames.
</description>
</method>
<method name="is_absolute" qualifiers="const">
- <return type="bool">
- </return>
+ <return type="bool" />
<description>
Returns [code]true[/code] if the node path is absolute (as opposed to relative), which means that it starts with a slash character ([code]/[/code]). Absolute node paths can be used to access the root node ([code]"/root"[/code]) or autoloads (e.g. [code]"/global"[/code] if a "global" autoload was registered).
</description>
</method>
<method name="is_empty" qualifiers="const">
- <return type="bool">
- </return>
+ <return type="bool" />
<description>
Returns [code]true[/code] if the node path is empty.
</description>
</method>
<method name="operator !=" qualifiers="operator">
- <return type="bool">
- </return>
- <argument index="0" name="right" type="NodePath">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="right" type="NodePath" />
<description>
</description>
</method>
<method name="operator ==" qualifiers="operator">
- <return type="bool">
- </return>
- <argument index="0" name="right" type="NodePath">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="right" type="NodePath" />
<description>
</description>
</method>