NodePath

A pre-parsed relative or absolute path in a scene tree, for use with Node.getNode and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, "Path2D/PathFollow2D/Sprite:texture:size" would refer to the size property of the texture resource on the node named “Sprite” which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.

Exporting a NodePath variable will give you a node selection widget in the properties panel of the editor, which can often be useful.

A NodePath is made up of a list of node names, a list of “subnode” (resource) names, and the name of a property in the final node or resource.

Constructors

this
this(String from)
Undocumented in source.
this
this(string name)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

getName
String getName(int idx)
Undocumented in source. Be warned that the author may not have intended to support it.
getNameCount
int getNameCount()
Undocumented in source. Be warned that the author may not have intended to support it.
getSubname
String getSubname(int idx)
Undocumented in source. Be warned that the author may not have intended to support it.
getSubnameCount
int getSubnameCount()
Undocumented in source. Be warned that the author may not have intended to support it.
isAbsolute
bool isAbsolute()
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(NodePath other)
Undocumented in source. Be warned that the author may not have intended to support it.
split
NodePath[2] split()

Splits a NodePath into a main node path and a property subpath (starting with a ':'). The second element is left empty if there is no property.

str
String str()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_node_path
godot_node_path _node_path;
Undocumented in source.

Meta