struct
Godot::NodePath
- Godot::NodePath
- Struct
- Value
- Object
Overview
Represents a path to a node or property in the Godot scene tree.
Defined in:
lapis/gd_extras/node_queries.crlibgodot/classes/node_path.cr
Constructors
Instance Method Summary
- #==(other : NodePath) : Bool
- #==(other : String) : Bool
-
#~ : Godot::Node
Unary tilde operator on
Godot::NodePath:~(node_path!("MyNode")). - #empty? : Bool
-
#get_subname(idx : Int64) : String
Returns the subname at the given index
-
#get_subname_count : Int64
Returns the subname count (number of colon-separated property paths after node)
- #path : String
- #path=(path : String)
-
#to_s(io : IO) : Void
Same as
#inspect(io). -
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
Instance methods inherited from class Object
try?(&)try? try?
Constructor Detail
Instance Method Detail
def ~ : Godot::Node
#
Unary tilde operator on Godot::NodePath: ~(node_path!("MyNode")).
Resolves the path against the active NodeContext.current.
Example:
path = Godot::NodePath.new("Visuals/Sprite2D")
sprite = ~path
def get_subname_count : Int64
#
Returns the subname count (number of colon-separated property paths after node)