class
Godot::Node
- Godot::Node
- Godot::Object
- Reference
- Object
Overview
=========================================================================== Node Idiomatic & Generic Extensions
Direct Known Subclasses
- Godot::AnimationMixer
- Godot::AudioStreamPlayer
- Godot::CanvasItem
- Godot::CanvasLayer
- Godot::EditorFileSystem
- Godot::EditorPlugin
- Godot::EditorResourcePreview
- Godot::HTTPRequest
- Godot::InstancePlaceholder
- Godot::MissingNode
- Godot::MultiplayerSpawner
- Godot::MultiplayerSynchronizer
- Godot::NavigationAgent2D
- Godot::NavigationAgent3D
- Godot::Node3D
- Godot::ResourcePreloader
- Godot::ShaderGlobalsOverride
- Godot::StatusIndicator
- Godot::Timer
- Godot::Viewport
- Godot::WorldEnvironment
Defined in:
lapis/extras/operators.crlapis/extras/wildcards.cr
libgodot/classes/node.cr
libgodot/extensions/node.cr
libgodot/extensions/query.cr
libgodot/extensions/scene_tree.cr
libgodot/extensions/tween.cr
libgodot/generated/classes/classes_part1.cr
libgodot/timer.cr
Constant Summary
-
NOTIFICATION_ACCESSIBILITY_INVALIDATE =
3001_i64 -
NOTIFICATION_ACCESSIBILITY_UPDATE =
3000_i64 -
NOTIFICATION_APPLICATION_FOCUS_IN =
2016_i64 -
NOTIFICATION_APPLICATION_FOCUS_OUT =
2017_i64 -
NOTIFICATION_APPLICATION_PAUSED =
2015_i64 -
NOTIFICATION_APPLICATION_PIP_MODE_ENTERED =
2019_i64 -
NOTIFICATION_APPLICATION_PIP_MODE_EXITED =
2020_i64 -
NOTIFICATION_APPLICATION_RESUMED =
2014_i64 -
NOTIFICATION_CHILD_ORDER_CHANGED =
24_i64 -
NOTIFICATION_CRASH =
2012_i64 -
NOTIFICATION_DISABLED =
28_i64 -
NOTIFICATION_DRAG_BEGIN =
21_i64 -
NOTIFICATION_DRAG_END =
22_i64 -
NOTIFICATION_EDITOR_POST_SAVE =
9002_i64 -
NOTIFICATION_EDITOR_PRE_SAVE =
9001_i64 -
NOTIFICATION_ENABLED =
29_i64 -
NOTIFICATION_ENTER_TREE =
10_i64 -
NOTIFICATION_EXIT_TREE =
11_i64 -
NOTIFICATION_INTERNAL_PHYSICS_PROCESS =
26_i64 -
NOTIFICATION_INTERNAL_PROCESS =
25_i64 -
NOTIFICATION_MOVED_IN_PARENT =
12_i64 -
NOTIFICATION_OS_IME_UPDATE =
2013_i64 -
NOTIFICATION_OS_MEMORY_WARNING =
2009_i64 -
NOTIFICATION_PARENTED =
18_i64 -
NOTIFICATION_PATH_RENAMED =
23_i64 -
NOTIFICATION_PAUSED =
14_i64 -
NOTIFICATION_PHYSICS_PROCESS =
16_i64 -
NOTIFICATION_POST_ENTER_TREE =
27_i64 -
NOTIFICATION_PROCESS =
17_i64 -
NOTIFICATION_READY =
13_i64 -
NOTIFICATION_RESET_PHYSICS_INTERPOLATION =
2001_i64 -
NOTIFICATION_SCENE_INSTANTIATED =
20_i64 -
NOTIFICATION_TEXT_SERVER_CHANGED =
2018_i64 -
NOTIFICATION_TRANSLATION_CHANGED =
2010_i64 -
NOTIFICATION_UNPARENTED =
19_i64 -
NOTIFICATION_UNPAUSED =
15_i64 -
NOTIFICATION_VP_MOUSE_ENTER =
1010_i64 -
NOTIFICATION_VP_MOUSE_EXIT =
1011_i64 -
NOTIFICATION_WM_ABOUT =
2011_i64 -
NOTIFICATION_WM_CLOSE_REQUEST =
1006_i64 -
NOTIFICATION_WM_DPI_CHANGE =
1009_i64 -
NOTIFICATION_WM_GO_BACK_REQUEST =
1007_i64 -
NOTIFICATION_WM_MOUSE_ENTER =
1002_i64 -
NOTIFICATION_WM_MOUSE_EXIT =
1003_i64 -
NOTIFICATION_WM_OUTPUT_MAX_LINEAR_VALUE_CHANGED =
1013_i64 -
NOTIFICATION_WM_POSITION_CHANGED =
1012_i64 -
NOTIFICATION_WM_SIZE_CHANGED =
1008_i64 -
NOTIFICATION_WM_WINDOW_FOCUS_IN =
1004_i64 -
NOTIFICATION_WM_WINDOW_FOCUS_OUT =
1005_i64 -
STANDALONE_PARENTS =
Hash(UInt64, Node).new
Constructors
-
.~ : self
Class unary ~ returns typed instance looked up from active NodeContext (by name first, then searching children)
-
.instantiate(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true) : self
Instantiates a PackedScene (.tscn) from path or scene instance directly as this Node type.
-
.instantiate(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true, &block : self -> Void) : self
Instantiates a PackedScene (.tscn) from path or scene instance directly as this Node type and configures it in a block.
- .new(pointer : Pointer(Void) = Pointer(Void).null)
Class Method Summary
-
.cast_to?(node : Node, type : T.class) : T | Nil forall T
Attempts to downcast or wrap this node as type T.
-
.decompose_node_path(raw_path : String) : Tuple(Bool, String, String | Nil)
Decomposes a raw path string, stripping leading '$' and extracting unique root prefix if present.
- .get_orphan_node_ids : Pointer(Void)
-
.instantiate?(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true) : self | Nil
Safe nilable variant: instantiates a PackedScene directly as this Node type, returning nil on load failure or type mismatch.
-
.instantiate?(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true, &block : self -> Void) : self | Nil
Safe nilable variant configuring the instance in a block when not nil.
- .print_orphan_nodes : Void
Instance Method Summary
-
#%(unique_name : String | NodePath) : Node
Scene Unique Node operator (mirrors GDScript %): node % "HealthBar"
-
#%(type : T.class) : T forall T
Typed Scene Unique Node operator: node % ProgressBar
-
#*(tuple : Tuple(String, T.class)) : Array(T) forall T
Multi-node typed wildcard glob query operator: self * {"Node/*/Mesh", MeshInstance3D}
-
#*(tuple : Tuple(Regex, T.class)) : Array(T) forall T
Multi-node typed regex query operator: self * {/^HitBox_\d+$/, Area3D}
-
#*(pattern : String) : Array(Node)
Multi-node wildcard glob query operator: self * "Node/*/Mesh"
-
#*(regex : Regex) : Array(Node)
Multi-node regex query operator: self * /^HitBox_\d+$/
-
#/(path : String | NodePath) : Node
Path traversal operator: node / "Camera3D" or node / node_path!("Camera3D")
-
#/(type : T.class) : T forall T
Typed path traversal operator: node / Sprite2D
-
#<<(child : Godot::Node) : self
Appends child to this node, enabling fluent chaining (parent << child1 << child2)
-
#<<(type : T.class) forall T
Typed ancestor navigation: hitbox << Player
-
#[](path : String | NodePath, type : ::Array(T).class) : Array(T) forall T
Multi-node typed glob query returning Array(T)
-
#[](path : String | NodePath, type : T.class) : T forall T
Typed path lookup: self["Visuals/Sprite2D", Sprite2D]
-
#[](type : ::Array(T).class, path : String | NodePath) : Array(T) forall T
Flexible type-first overloads for Array(T)
-
#[](type : T.class, path : String | NodePath) : T forall T
Flexible type-first overload: self[Sprite2D, "Visuals/Sprite2D"]
-
#[](path : String) : Node
Indexer syntactic sugar for retrieving a child node by path (e.g.
-
#[](path : NodePath) : Node
NodePath indexers
-
#[](type : T.class) : T forall T
Type-inferred typed indexer: self[Sprite2D] -> looks up "Sprite2D" cast to Sprite2D
-
#[]?(path : String | NodePath, type : ::Array(T).class) : Array(T) | Nil forall T
Safe multi-node typed glob query returning nil if the result array would have been empty
-
#[]?(path : String | NodePath, type : T.class) : T | Nil forall T
Safe typed path lookup: self["Visuals/Sprite2D", Sprite2D]?
- #[]?(type : ::Array(T).class, path : String | NodePath) : Array(T) | Nil forall T
-
#[]?(type : T.class, path : String | NodePath) : T | Nil forall T
Safe flexible type-first overload: self[Sprite2D, "Visuals/Sprite2D"]?
-
#[]?(path : String) : Node | Nil
Safe indexer returning nil if node not found (e.g.
- #[]?(path : NodePath) : Node | Nil
-
#[]?(type : T.class) : T | Nil forall T
Safe type-inferred indexer: self[Sprite2D]? -> returns Sprite2D? or nil if not found
-
#_enter_tree : Void
Lifecycle callback called when the node enters the tree hierarchy.
-
#_exit_tree : Void
Lifecycle callback called when the node exits the tree hierarchy.
-
#_physics_process(delta : Float64) : Void
Fixed-rate physics process callback receiving delta timestep in seconds (
Float64). -
#_process(delta : Float64) : Void
Per-frame process callback receiving delta timestep in seconds (
Float64). -
#_ready : Void
Lifecycle callback called when the node enters the active scene tree.
-
#~ : self
Instance unary ~ returns self, allowing ~self or nested unary chaining
-
#add_child(type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T
Overload: Instantiates a Node of class T, configures it in block, adds it as child, and returns it.
-
#add_child(type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T
Overload: Instantiates a Node of class T, adds it as child, and returns it.
-
#add_child(scene : PackedScene, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : Node
Overload: Instantiates a PackedScene as Node, adds it as child, and returns it.
-
#add_child(node : T, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T
Adds a child node.
-
#add_child(scene : PackedScene, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : Node -> Void) : Node
Overload: Instantiates a PackedScene as Node, configures it in block, adds it as child, and returns it.
-
#add_child(node : T, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T
Overload: Adds an existing child node, configures it in block, and returns concrete instance type T.
-
#add_child(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T
Overload: Instantiates a scene at path or PackedScene as type T, configures in block, adds as child, and returns it.
-
#add_child(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T
Overload: Instantiates a PackedScene as type T, configures it in block, adds it as child, and returns it.
-
#add_child(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T
Overload: Instantiates a scene at path or PackedScene as type T, adds as child, and returns it.
-
#add_child(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T
Overload: Instantiates a PackedScene as type T, adds it as child, and returns it.
-
#add_child(scene_path : String, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T
Overload: Loads scene at path, instantiates as type T, configures in block, adds as child, and returns it.
-
#add_child(scene_path : String, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T
Overload: Loads scene at path, instantiates as type T, adds as child, and returns it.
-
#add_sibling(type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T
Overload: Instantiates a Node of class T, configures it in block, adds it as sibling, and returns it.
-
#add_sibling(type : T.class, force_readable_name : Bool = false) : T forall T
Overload: Instantiates a Node of class T, adds it as sibling, and returns it.
-
#add_sibling(scene : PackedScene, force_readable_name : Bool = false) : Node
Overload: Instantiates a PackedScene as Node, adds it as sibling, and returns it.
- #add_sibling(sibling : T, force_readable_name : Bool = false) : T forall T
-
#add_sibling(scene : PackedScene, force_readable_name : Bool = false, &block : Node -> Void) : Node
Overload: Instantiates a PackedScene as Node, configures it in block, adds it as sibling, and returns it.
-
#add_sibling(sibling : T, force_readable_name : Bool = false, &block : T -> Void) : T forall T
Overload: Adds an existing sibling node, configures it in block, and returns concrete type T.
-
#add_sibling(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T
Overload: Instantiates a scene at path or PackedScene as type T, configures in block, adds as sibling, and returns it.
-
#add_sibling(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T
Overload: Instantiates a PackedScene as type T, configures it in block, adds it as sibling, and returns it.
-
#add_sibling(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false) : T forall T
Overload: Instantiates a scene at path or PackedScene as type T, adds as sibling, and returns it.
-
#add_sibling(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false) : T forall T
Overload: Instantiates a PackedScene as type T, adds it as sibling, and returns it.
-
#add_sibling(scene_path : String, *, as type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T
Overload: Loads scene at path, instantiates as type T, configures in block, adds as sibling, and returns it.
-
#add_sibling(scene_path : String, *, as type : T.class, force_readable_name : Bool = false) : T forall T
Overload: Loads scene at path, instantiates as type T, adds as sibling, and returns it.
-
#add_to_group(group : String, persistent : Bool = false) : Void
Adds this node to the specified group (with default non-persistent flag)
-
#after(delay : ::Time::Span | Number, &block : TimerHandle -> Void) : TimerHandle
Schedules a one-shot delay scoped to this node's lifecycle
-
#ancestor(type : T.class) : T forall T
Walks up the parent hierarchy to find the nearest ancestor of type T, raising NodeNotFoundError if not found.
-
#ancestor?(pattern : String, type : T.class, case_sensitive : Bool = true) : T | Nil forall T
Walks up the parent hierarchy to find the nearest ancestor matching the pattern and type.
-
#ancestor?(type : T.class) : T | Nil forall T
Walks up the parent hierarchy to find the nearest ancestor of type T, returning nil if not found.
-
#ancestor?(pattern : String, case_sensitive : Bool = true) : Node | Nil
Walks up the parent hierarchy to find the nearest ancestor matching pattern.
-
#ancestor_in_group?(group : String) : Node | Nil
Returns the nearest ancestor node (or nil) belonging to
#group. - #ancestor_in_group?(group : Symbol) : Node | Nil
-
#ancestor_of?(node : Node) : Bool
Predicate alias for
#is_ancestor_of -
#ancestors(type : T.class) : Array(T) forall T
Returns an Array containing all ancestor nodes up to the root cast to type T.
-
#ancestors : Array(Node)
Returns an Array containing all ancestor nodes up to the root.
- #atr(message : String, context : String = "") : String
- #atr_n(message : String, plural_message : String, n : Int64, context : String = "") : String
-
#auto_translate_mode
Property
#auto_translate_modegetter -
#auto_translate_mode=(val : Int | Enum)
Property
#auto_translate_modesetter - #bind_child_entered_tree(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R
- #bind_child_entered_tree(once : Bool = false, &block : Node -> Void) : UInt64
- #bind_child_exiting_tree(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R
- #bind_child_exiting_tree(once : Bool = false, &block : Node -> Void) : UInt64
- #bind_child_order_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_child_order_changed(once : Bool = false, &block : -> Void) : UInt64
- #bind_editor_description_changed(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R
- #bind_editor_description_changed(once : Bool = false, &block : Node -> Void) : UInt64
- #bind_editor_state_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_editor_state_changed(once : Bool = false, &block : -> Void) : UInt64
- #bind_ready(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_ready(once : Bool = false, &block : -> Void) : UInt64
- #bind_renamed(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_renamed(once : Bool = false, &block : -> Void) : UInt64
- #bind_replacing_by(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R
- #bind_replacing_by(once : Bool = false, &block : Node -> Void) : UInt64
- #bind_tree_entered(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_tree_entered(once : Bool = false, &block : -> Void) : UInt64
- #bind_tree_exited(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_tree_exited(once : Bool = false, &block : -> Void) : UInt64
- #bind_tree_exiting(callback : Proc(R), once : Bool = false) : UInt64 forall R
- #bind_tree_exiting(once : Bool = false, &block : -> Void) : UInt64
-
#busy_setting_up_children? : Bool
Returns true if Godot currently has this parent node locked (
data.blocked > 0) while propagating#_enter_treeor#_readyto its descendants, during which synchronous#add_childfails in Godot. - #can_auto_translate : Bool
-
#can_auto_translate? : Bool
Predicate alias for
#can_auto_translate - #can_process : Bool
-
#can_process? : Bool
Predicate alias for
#can_process -
#change_scene!(path : String) : Nil
Changes running scene via the active SceneTree
-
#change_scene!(scene : PackedScene) : Nil
Changes running scene to PackedScene via the active SceneTree
-
#child_count : Int32
Idiomatic child count getter
- #child_entered_tree : Godot::TypedSignal(Node)
-
#child_entered_tree=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.child_entered_tree += ->handler,node.child_entered_tree -= ->handler) - #child_entered_tree_signal_hash : UInt64
- #child_entered_tree_slot : Lapis::Core::StaticSignalSlot(Node)
- #child_exiting_tree : Godot::TypedSignal(Node)
-
#child_exiting_tree=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.child_exiting_tree += ->handler,node.child_exiting_tree -= ->handler) - #child_exiting_tree_signal_hash : UInt64
- #child_exiting_tree_slot : Lapis::Core::StaticSignalSlot(Node)
- #child_order_changed : Godot::TypedSignal()
-
#child_order_changed=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.child_order_changed += ->handler,node.child_order_changed -= ->handler) - #child_order_changed_signal_hash : UInt64
- #child_order_changed_slot : Lapis::Core::StaticSignalSlot()
-
#children(include_internal : Bool = false) : Array(Node)
Alias for
#get_children(falls back to local children array when running standalone) -
#clear_children(include_internal : Bool = false) : Void
Removes and frees all child nodes under this node.
-
#create_child(type : T.class, &block : T -> ) : T forall T
Idiomatic alias for spawn_child
-
#create_child(type : T.class) : T forall T
Idiomatic alias for spawn_child
- #create_tween : Tween
-
#current_scene_as(type : T.class) : T | Nil forall T
Returns the current running scene cast to wrapper type T
-
#defer_add_child(node : Node, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : Void
Explicit cross-thread helper that safely defers addition via Godot's MessageQueue
-
#defer_move_child(child_node : Node, to_position : Int64 | Int32) : Void
Explicit cross-thread helper that safely defers moving child via Godot's MessageQueue
-
#defer_queue_free : Void
Explicit cross-thread helper that safely queues deletion via Godot's MessageQueue
-
#defer_remove_child(node : Node) : Void
Explicit cross-thread helper that safely defers removal via Godot's MessageQueue
-
#defer_reparent(new_parent : Node, keep_global_transform : Bool = true) : Void
Explicit cross-thread helper that safely defers reparenting via Godot's MessageQueue
-
#descendants(type : T.class) : Array(T) forall T
Returns all descendant nodes of this node matching or cast to type T.
-
#descendants : Array(Node)
Returns all descendant nodes of this node as Array(Node).
-
#destroy : Void
Safely destroys this node, unregistering parent references in standalone mode.
-
#displayed_folded? : Bool
Predicate alias for
#is_displayed_folded - #duplicate(flags : Int64 = 15_i64) : Node
-
#each_child(include_internal : Bool = false, &block : Node -> Void) : Void
Yields each child node without allocating an intermediate array.
-
#each_descendant(type : T.class, &) : Void forall T
Streaming iteration over all descendants cast to type
Twith receiver and argument scoping. -
#each_descendant(&) : Void
Streaming iteration over all descendants with receiver and argument scoping.
-
#each_node(pattern : String, case_sensitive : Bool = true, &) : Void
Streams through all nodes matching
pattern, scoping each node as bothselfand the block argument. -
#each_node(pattern : String, type : T.class, case_sensitive : Bool = true, &) : Void forall T
Streams through all nodes matching
patterncast to typeT, scoping each node as bothselfand the block argument. -
#editable_instance?(node : Node) : Bool
Predicate alias for
#is_editable_instance -
#editor_description
Property
#editor_descriptiongetter -
#editor_description=(val)
Property
#editor_descriptionsetter - #editor_description_changed : Godot::TypedSignal(Node)
-
#editor_description_changed=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.editor_description_changed += ->handler,node.editor_description_changed -= ->handler) - #editor_description_changed_signal_hash : UInt64
- #editor_description_changed_slot : Lapis::Core::StaticSignalSlot(Node)
- #editor_state_changed : Godot::TypedSignal()
-
#editor_state_changed=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.editor_state_changed += ->handler,node.editor_state_changed -= ->handler) - #editor_state_changed_signal_hash : UInt64
- #editor_state_changed_slot : Lapis::Core::StaticSignalSlot()
- #emit_child_entered_tree(*args) : Void
- #emit_child_exiting_tree(*args) : Void
- #emit_child_order_changed : Void
- #emit_editor_description_changed(*args) : Void
- #emit_editor_state_changed : Void
- #emit_ready : Void
- #emit_renamed : Void
- #emit_replacing_by(*args) : Void
- #emit_tree_entered : Void
- #emit_tree_exited : Void
- #emit_tree_exiting : Void
- #engine_add_child(node : Node, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : Void
- #engine_add_sibling(sibling : Node, force_readable_name : Bool = false) : Void
-
#every(interval : ::Time::Span | Number, &block : TimerHandle -> Void) : TimerHandle
Schedules a recurring timer scoped to this node's lifecycle
-
#find_ancestor_as(type : T.class) : T | Nil forall T
Searches upward in the scene hierarchy (through parents) for an ancestor of type T.
-
#find_ancestor_as!(type : T.class) : T forall T
Searches upward in the scene hierarchy for an ancestor of type T.
-
#find_child(pattern : String, recursive : Bool = true, owned : Bool = true) : Node
Finds an existing child node matching
pattern. -
#find_child(regex : Regex, recursive : Bool = true) : Node | Nil
Finds the first child or descendant matching the regex pattern
-
#find_child?(pattern : String, recursive : Bool = true, owned : Bool = false) : Node | Nil
Finds child node matching pattern, returning nil if not found
-
#find_child_as(type : T.class, pattern : String, recursive : Bool = true, owned : Bool = false) : T | Nil forall T
Finds child node matching pattern and casts to T, returning nil if not found
-
#find_child_by_regex(regex : Regex, recursive : Bool = true) : Node | Nil
Alias for find_child(regex)
- #find_children(pattern : String, get_type : String = "", recursive : Bool = true, owned : Bool = true) : Pointer(Void)
-
#find_children(regex : Regex, recursive : Bool = true) : Array(Node)
Finds all children or descendants matching the regex pattern
-
#find_children(regex : Regex, type : T.class, recursive : Bool = true) : Array(T) forall T
Finds all children or descendants matching the regex pattern filtered and cast to
Array(T) -
#find_children_by_regex(regex : Regex, recursive : Bool = true) : Array(Node)
Alias for find_children(regex)
- #find_parent(pattern : String) : Node
-
#first_child?(type : T.class) : T | Nil forall T
Returns the first child node cast to type T, or nil if none found.
-
#first_child? : Node | Nil
Returns the first child node, or nil if this node has no children.
-
#first_node(pattern : String, case_sensitive : Bool = true) : Node
Returns the first node matching pattern, raising NodeNotFoundError if not found.
-
#first_node(pattern : String, type : T.class, case_sensitive : Bool = true) : T forall T
Returns the first node matching pattern cast to type T, raising NodeNotFoundError if not found.
-
#first_node?(pattern : String, case_sensitive : Bool = true) : Node | Nil
Returns the first node matching pattern, or nil if none found.
-
#first_node?(pattern : String, type : T.class, case_sensitive : Bool = true) : T | Nil forall T
Returns the first node matching pattern cast to type T, or nil if none found or type mismatch.
-
#first_node_in_group(group : String, type : T.class) : T forall T
Returns the first node in the given group cast to type T, raising NodeNotFoundError if none found.
-
#first_node_in_group(group : String) : Node
Returns the first node in the given group, raising NodeNotFoundError if none found.
-
#first_node_in_group?(group : String, type : T.class) : T | Nil forall T
Returns the first node in the given group cast to type T, or nil if none found.
-
#first_node_in_group?(group : String) : Node | Nil
Returns the first node in the given group, or nil if none found.
- #get_accessibility_element : Int64
- #get_auto_translate_mode : AutoTranslateMode
-
#get_child(idx : Int64, include_internal : Bool = false) : Node
Returns the child node at index
idx. - #get_child(idx : Int, include_internal : Bool = false) : Node
-
#get_child?(idx : Int, include_internal : Bool = false) : Node | Nil
Retrieves child at specified index, or nil if not found
-
#get_child_as(type : T.class, idx : Int, include_internal : Bool = false) : T | Nil forall T
Retrieves child at specified index cast to type T, or nil if not found or not matching type
-
#get_child_count(include_internal : Bool = false) : Int64
Returns the number of child nodes belonging to this node.
-
#get_children(include_internal : Bool = false) : Array(Node)
Returns an Array containing all child nodes belonging to this node.
-
#get_children_as(type : T.class, include_internal : Bool = false) : Array(T) forall T
Returns all children of this node matching or cast to type T.
- #get_editor_description : String
- #get_groups : Pointer(Void)
- #get_index(include_internal : Bool = false) : Int64
- #get_last_exclusive_window : Window
- #get_multiplayer : MultiplayerAPI
- #get_multiplayer_authority : Int64
-
#get_name : String
Returns the node name
-
#get_node(path : String) : Node
Retrieves a child or sibling node by NodePath string.
-
#get_node(path : NodePath) : Node
Overloads for NodePath
- #get_node(path : NodePath | String) : Node
-
#get_node?(path : String) : Node | Nil
Retrieves a child or sibling node by NodePath string, or returns nil if not found.
- #get_node?(path : NodePath) : Node | Nil
- #get_node_and_resource(path : NodePath | String) : Pointer(Void)
-
#get_node_as(path : String | NodePath, type : T.class) : T forall T
Retrieves a child node cast to the specified Crystal class type
T. -
#get_node_as?(path : String | NodePath, type : T.class) : T | Nil forall T
Retrieves a child node cast to the specified Crystal class type
T, or nil if not found or type mismatch. -
#get_node_or_null(path : String) : Node | Nil
Fetches a node by String path.
- #get_node_or_null(path : NodePath) : Node | Nil
- #get_node_or_null(path : NodePath | String) : Node
- #get_node_rpc_config : Pointer(Void)
-
#get_nodes(pattern : String, case_sensitive : Bool = true) : Array(Node)
Returns all child/descendant nodes matching the glob pattern.
-
#get_nodes(pattern : String, type : T.class, case_sensitive : Bool = true) : Array(T) forall T
Returns all nodes matching the glob pattern filtered and cast to
Array(T). -
#get_orphan_node_ids : Pointer(Void)
Instance convenience delegator for static method
#get_orphan_node_ids - #get_owner : Node
-
#get_parent : Node
Returns the parent Node.
-
#get_parent? : Node | Nil
Returns the parent Node, or nil if orphan
-
#get_parent_as(type : T.class) : T | Nil forall T
Returns the parent node cast to T, or nil if parent is not of type T or is null
- #get_path : NodePath
- #get_path_to(node : Node, use_unique_path : Bool = false) : NodePath
- #get_physics_interpolation_mode : PhysicsInterpolationMode
- #get_physics_process_delta_time : Float64
- #get_physics_process_priority : Int64
- #get_process_delta_time : Float64
- #get_process_mode : ProcessMode
- #get_process_priority : Int64
- #get_process_thread_group : ProcessThreadGroup
- #get_process_thread_group_order : Int64
- #get_process_thread_messages : ProcessThreadMessages
- #get_scene_file_path : String
- #get_scene_instance_load_placeholder : Bool
-
#get_scene_instance_load_placeholder? : Bool
Predicate alias for
#get_scene_instance_load_placeholder - #get_tree : SceneTree
-
#get_tree? : SceneTree | Nil
Returns the SceneTree containing this node, or nil if not inside the tree
- #get_tree_string : String
- #get_tree_string_pretty : String
-
#get_unique_node_as(unique_name : String, type : T.class) : T | Nil forall T
Returns the scene unique node with name
%unique_namecast to T - #get_viewport : Viewport
-
#get_viewport? : Viewport | Nil
Returns the viewport this node is attached to, or nil if detached/orphan
- #get_window : Window
-
#greater_than?(node : Node) : Bool
Predicate alias for
#is_greater_than -
#group(name : String | Symbol) : GroupQuery
Returns a fluent GroupQuery for the specified node group.
- #has_node(path : NodePath | String) : Bool
-
#has_node?(path : NodePath | String) : Bool
Predicate alias for
#has_node - #has_node_and_resource(path : NodePath | String) : Bool
-
#has_node_and_resource?(path : NodePath | String) : Bool
Predicate alias for
#has_node_and_resource -
#in_group?(group_name : String) : Bool
Returns true if this node belongs to the given node group.
-
#in_group?(group_name : Symbol) : Bool
Returns true if this node belongs to the given node group specified as a Symbol.
-
#in_group?(group_name : String | Symbol) : Bool
Returns true if this node belongs to the given node group specified as String or Symbol.
-
#in_group?(*groups : String | Symbol) : Bool
Returns
trueif this node belongs to any of the specified groups. -
#in_group_or_ancestor?(group : String) : Bool
Checks if this node, or any ancestor above it in the scene tree, belongs to
#group. - #in_group_or_ancestor?(group : Symbol) : Bool
-
#inside_tree? : Bool
Predicate alias for
#is_inside_tree - #is_ancestor_of(node : Node) : Bool
-
#is_ancestor_of?(node : Node) : Bool
Predicate alias for
#is_ancestor_of - #is_displayed_folded : Bool
-
#is_displayed_folded? : Bool
Predicate alias for
#is_displayed_folded - #is_editable_instance(node : Node) : Bool
-
#is_editable_instance?(node : Node) : Bool
Predicate alias for
#is_editable_instance - #is_greater_than(node : Node) : Bool
-
#is_greater_than?(node : Node) : Bool
Predicate alias for
#is_greater_than - #is_in_group(group : String) : Bool
-
#is_in_group?(group : String) : Bool
Predicate alias for
#is_in_group - #is_inside_tree : Bool
-
#is_inside_tree? : Bool
Predicate alias for
#is_inside_tree - #is_multiplayer_authority : Bool
-
#is_multiplayer_authority? : Bool
Predicate alias for
#is_multiplayer_authority - #is_node_ready : Bool
-
#is_node_ready? : Bool
Predicate alias for
#is_node_ready - #is_part_of_edited_scene : Bool
-
#is_part_of_edited_scene? : Bool
Predicate alias for
#is_part_of_edited_scene - #is_physics_interpolated : Bool
-
#is_physics_interpolated? : Bool
Predicate alias for
#is_physics_interpolated - #is_physics_interpolated_and_enabled : Bool
-
#is_physics_interpolated_and_enabled? : Bool
Predicate alias for
#is_physics_interpolated_and_enabled - #is_physics_processing : Bool
-
#is_physics_processing? : Bool
Predicate alias for
#is_physics_processing - #is_physics_processing_internal : Bool
-
#is_physics_processing_internal? : Bool
Predicate alias for
#is_physics_processing_internal - #is_processing : Bool
-
#is_processing? : Bool
Predicate alias for
#is_processing - #is_processing_input : Bool
-
#is_processing_input? : Bool
Predicate alias for
#is_processing_input - #is_processing_internal : Bool
-
#is_processing_internal? : Bool
Predicate alias for
#is_processing_internal - #is_processing_shortcut_input : Bool
-
#is_processing_shortcut_input? : Bool
Predicate alias for
#is_processing_shortcut_input - #is_processing_unhandled_input : Bool
-
#is_processing_unhandled_input? : Bool
Predicate alias for
#is_processing_unhandled_input - #is_processing_unhandled_key_input : Bool
-
#is_processing_unhandled_key_input? : Bool
Predicate alias for
#is_processing_unhandled_key_input - #is_unique_name_in_owner : Bool
-
#is_unique_name_in_owner? : Bool
Predicate alias for
#is_unique_name_in_owner -
#last_child?(type : T.class) : T | Nil forall T
Returns the last child node cast to type T, or nil if none found.
-
#last_child? : Node | Nil
Returns the last child node, or nil if this node has no children.
- #local_groups : Set(String)
-
#move_child(child_node : Node, to_index : Int64) : Void
Moves child node to a new index in the parent's child list.
- #move_child(child_node : Node, to_index : Int) : Void
-
#multiplayer
Property
#multiplayergetter -
#multiplayer_authority? : Bool
Predicate alias for
#is_multiplayer_authority - #name : String
- #name=(val : String)
-
#next_sibling?(type : T.class) : T | Nil forall T
Returns the next sibling node cast to type T, or nil if none found.
-
#next_sibling? : Node | Nil
Returns the next sibling node in the parent's child list, or nil if this is the last child or an orphan.
-
#node_as(path : String | NodePath, type : T.class) : T forall T
Shorthand for get_node_as
-
#node_as?(path : String | NodePath, type : T.class) : T | Nil forall T
Shorthand for get_node_as?
-
#node_ready? : Bool
Predicate alias for
#is_node_ready -
#nodes_in_group(group : String, type : T.class) : Array(T) forall T
Returns all nodes in the given group from the active scene tree (or local subtree in standalone mode) cast to type T.
-
#nodes_in_group(group : String) : Array(Node)
Returns all nodes in the given group from the active scene tree (or local subtree in standalone mode) as Array(Node).
- #notify_deferred_thread_group(what : Int64) : Void
- #notify_thread_safe(what : Int64) : Void
-
#owner : Node | Nil
Returns the scene owner node responsible for serialization packing.
-
#owner=(o : Node | Nil)
Sets the scene owner node for serialization packing.
-
#part_of_edited_scene? : Bool
Predicate alias for
#is_part_of_edited_scene -
#physics_interpolated? : Bool
Predicate alias for
#is_physics_interpolated -
#physics_interpolated_and_enabled? : Bool
Predicate alias for
#is_physics_interpolated_and_enabled -
#physics_interpolation_mode
Property
#physics_interpolation_modegetter -
#physics_interpolation_mode=(val : Int | Enum)
Property
#physics_interpolation_modesetter -
#physics_processing? : Bool
Predicate alias for
#is_physics_processing -
#physics_processing_internal? : Bool
Predicate alias for
#is_physics_processing_internal -
#play_sound(stream_or_path : AudioStream | String, at : Vector2 | Vector3 | Nil = nil, pitch_scale : Float64 = 1.0, volume_db : Float64 = 0.0, bus : String = "Master", &block : Node -> Void) : Node | Nil
Context-aware one-shot audio playback helper on Node
- #play_sound(stream_or_path : AudioStream | String, at : Vector2 | Vector3 | Nil = nil, pitch_scale : Float64 = 1.0, volume_db : Float64 = 0.0, bus : String = "Master") : Node | Nil
-
#previous_sibling?(type : T.class) : T | Nil forall T
Returns the previous sibling node cast to type T, or nil if none found.
-
#previous_sibling? : Node | Nil
Returns the previous sibling node in the parent's child list, or nil if this is the first child or an orphan.
-
#print_orphan_nodes : Void
Instance convenience delegator for static method
#print_orphan_nodes - #print_tree : Void
- #print_tree_pretty : Void
-
#process_mode
Property
#process_modegetter -
#process_mode=(val : Int | Enum)
Property
#process_modesetter -
#process_physics_priority
Property
#process_physics_prioritygetter -
#process_physics_priority=(val : Int | Enum)
Property
#process_physics_prioritysetter -
#process_priority
Property
#process_prioritygetter -
#process_priority=(val : Int | Enum)
Property
#process_prioritysetter -
#process_thread_group
Property
#process_thread_groupgetter -
#process_thread_group=(val : Int | Enum)
Property
#process_thread_groupsetter -
#process_thread_group_order
Property
#process_thread_group_ordergetter -
#process_thread_group_order=(val : Int | Enum)
Property
#process_thread_group_ordersetter -
#process_thread_messages
Property
#process_thread_messagesgetter -
#process_thread_messages=(val : Int | Enum)
Property
#process_thread_messagessetter -
#processing? : Bool
Predicate alias for
#is_processing -
#processing_input? : Bool
Predicate alias for
#is_processing_input -
#processing_internal? : Bool
Predicate alias for
#is_processing_internal -
#processing_shortcut_input? : Bool
Predicate alias for
#is_processing_shortcut_input -
#processing_unhandled_input? : Bool
Predicate alias for
#is_processing_unhandled_input -
#processing_unhandled_key_input? : Bool
Predicate alias for
#is_processing_unhandled_key_input - #propagate_call(method : String, args : Pointer(Void), parent_first : Bool = false) : Void
- #propagate_notification(what : Int64) : Void
- #queue_accessibility_update : Void
-
#queue_free : Void
Deallocates node cleanly at frame end on the Main Thread.
- #ready : Godot::TypedSignal()
-
#ready=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.ready += ->handler,node.ready -= ->handler) - #ready_signal_hash : UInt64
- #ready_slot : Lapis::Core::StaticSignalSlot()
-
#reload_scene! : Nil
Reloads running scene via the active SceneTree
-
#remove_child(node : Node) : Void
Removes a child node.
-
#remove_from_group(group : String) : Void
Removes this node from the specified group
-
#remove_from_tree : Void
Removes this node from its parent if currently inside a parent hierarchy.
- #renamed : Godot::TypedSignal()
-
#renamed=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.renamed += ->handler,node.renamed -= ->handler) - #renamed_signal_hash : UInt64
- #renamed_slot : Lapis::Core::StaticSignalSlot()
-
#reparent(new_parent : Node, keep_global_transform : Bool = true) : Void
Reparents this node to a new parent.
-
#replace_by(node : Node, keep_groups : Bool = false) : Void
Replaces this node with another node in the tree.
- #replacing_by : Godot::TypedSignal(Node)
-
#replacing_by=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.replacing_by += ->handler,node.replacing_by -= ->handler) - #replacing_by_signal_hash : UInt64
- #replacing_by_slot : Lapis::Core::StaticSignalSlot(Node)
- #request_ready : Void
- #reset_physics_interpolation : Void
-
#rpc(method : String | Symbol, *args) : Godot::Error
Calls an RPC method on this node across the multiplayer network.
- #rpc_config(method : String, config : Pointer(Void)) : Void
-
#rpc_id(peer_id : Int32 | Int64, method : String | Symbol, *args) : Godot::Error
Calls an RPC method on a specific peer ID across the multiplayer network.
-
#safe_queue_free : Void
Safe queue free that checks alive? before dispatching
-
#scene_file_path
Property
#scene_file_pathgetter -
#scene_file_path=(val)
Property
#scene_file_pathsetter -
#scene_root : Node
Alias to
#topmost_parent -
#self_or_ancestor(type : T.class) : T forall T
Traverses upward starting from self, returning the first node matching type T, or raising NilAssertionError.
-
#self_or_ancestor?(type : T.class) : T | Nil forall T
Traverses upward starting from self, returning the first node matching type T, or nil if none found.
- #set_auto_translate_mode(mode : AutoTranslateMode | Int) : Void
- #set_deferred_thread_group(property : String, value : Pointer(Void)) : Void
- #set_display_folded(fold : Bool) : Void
- #set_editable_instance(node : Node, is_editable : Bool) : Void
- #set_editor_description(editor_description : String) : Void
- #set_multiplayer_authority(id : Int64, recursive : Bool = true) : Void
-
#set_name(name : String) : Void
Sets the name of the node safely via dynamic reflection
- #set_owner(owner : Node) : Void
- #set_physics_interpolation_mode(mode : PhysicsInterpolationMode | Int) : Void
- #set_physics_process(enable : Bool) : Void
- #set_physics_process_internal(enable : Bool) : Void
- #set_physics_process_priority(priority : Int64) : Void
- #set_process(enable : Bool) : Void
- #set_process_input(enable : Bool) : Void
- #set_process_internal(enable : Bool) : Void
- #set_process_mode(mode : ProcessMode | Int) : Void
- #set_process_priority(priority : Int64) : Void
- #set_process_shortcut_input(enable : Bool) : Void
- #set_process_thread_group(mode : ProcessThreadGroup | Int) : Void
- #set_process_thread_group_order(order : Int64) : Void
- #set_process_thread_messages(flags : ProcessThreadMessages | Int) : Void
- #set_process_unhandled_input(enable : Bool) : Void
- #set_process_unhandled_key_input(enable : Bool) : Void
- #set_scene_file_path(scene_file_path : String) : Void
- #set_scene_instance_load_placeholder(load_placeholder : Bool) : Void
- #set_thread_safe(property : String, value : Pointer(Void)) : Void
- #set_translation_domain_inherited : Void
- #set_unique_name_in_owner(enable : Bool) : Void
-
#siblings(type : T.class) : Array(T) forall T
Returns all sibling nodes cast to type T, excluding this node.
-
#siblings : Array(Node)
Returns all sibling nodes sharing this node's parent, excluding this node.
-
#spawn(type : T.class, &block : T -> ) : T forall T
Fluent alias for spawn_child
-
#spawn(type : T.class) : T forall T
Fluent alias for spawn_child
-
#spawn_child(type : T.class, &block : T -> ) : T forall T
Spawns a child node of type T, configures it in a block, and attaches it to this node
-
#spawn_child(type : T.class) : T forall T
Spawns a child node of type T and attaches it to this node
-
#spawn_node(type : T.class, &block : T -> ) : T forall T
Idiomatic alias for spawn_child
-
#spawn_node(type : T.class) : T forall T
Idiomatic alias for spawn_child
-
#topmost_parent : Node
Walks upward to find the topmost ancestor node, or the SceneTree root if attached.
- #tree_entered : Godot::TypedSignal()
-
#tree_entered=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.tree_entered += ->handler,node.tree_entered -= ->handler) - #tree_entered_signal_hash : UInt64
- #tree_entered_slot : Lapis::Core::StaticSignalSlot()
- #tree_exited : Godot::TypedSignal()
-
#tree_exited=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.tree_exited += ->handler,node.tree_exited -= ->handler) - #tree_exited_signal_hash : UInt64
- #tree_exited_slot : Lapis::Core::StaticSignalSlot()
- #tree_exiting : Godot::TypedSignal()
-
#tree_exiting=(val : Godot::BoundSignal) : Godot::BoundSignal
Identity setter enabling compound operator sugar (
node.tree_exiting += ->handler,node.tree_exiting -= ->handler) - #tree_exiting_signal_hash : UInt64
- #tree_exiting_slot : Lapis::Core::StaticSignalSlot()
-
#tween(&) : Godot::Tween
Builds a tween using an expressive builder DSL
- #unbind_child_entered_tree(callback : Proc(Node, R)) : Bool forall R
- #unbind_child_entered_tree(token : UInt64) : Bool
- #unbind_child_exiting_tree(callback : Proc(Node, R)) : Bool forall R
- #unbind_child_exiting_tree(token : UInt64) : Bool
- #unbind_child_order_changed(callback : Proc(R)) : Bool forall R
- #unbind_child_order_changed(token : UInt64) : Bool
- #unbind_editor_description_changed(callback : Proc(Node, R)) : Bool forall R
- #unbind_editor_description_changed(token : UInt64) : Bool
- #unbind_editor_state_changed(callback : Proc(R)) : Bool forall R
- #unbind_editor_state_changed(token : UInt64) : Bool
- #unbind_ready(callback : Proc(R)) : Bool forall R
- #unbind_ready(token : UInt64) : Bool
- #unbind_renamed(callback : Proc(R)) : Bool forall R
- #unbind_renamed(token : UInt64) : Bool
- #unbind_replacing_by(callback : Proc(Node, R)) : Bool forall R
- #unbind_replacing_by(token : UInt64) : Bool
- #unbind_tree_entered(callback : Proc(R)) : Bool forall R
- #unbind_tree_entered(token : UInt64) : Bool
- #unbind_tree_exited(callback : Proc(R)) : Bool forall R
- #unbind_tree_exited(token : UInt64) : Bool
- #unbind_tree_exiting(callback : Proc(R)) : Bool forall R
- #unbind_tree_exiting(token : UInt64) : Bool
-
#unique_as(name : String | NodePath, type : T.class) : T forall T
Shorthand for retrieving a scene unique node cast to type
T -
#unique_as?(name : String | NodePath, type : T.class) : T | Nil forall T
Safe shorthand for retrieving a scene unique node cast to type
T, or nil if not found or type mismatch -
#unique_name_in_owner
Property
#unique_name_in_ownergetter -
#unique_name_in_owner=(val)
Property
#unique_name_in_ownersetter -
#unique_name_in_owner? : Bool
Predicate alias for
#is_unique_name_in_owner - #update_configuration_warnings : Void
-
#with_context(&)
Executes block with this node as the active NodeContext
Instance methods inherited from class Godot::Object
==(other : Godot::Object) : Bool==(other : Nil) : Bool ==, _enter_tree : Void _enter_tree, _exit_tree : Void _exit_tree, _godot_bind_static_signals(force : Bool = false) : Void _godot_bind_static_signals, _godot_bind_static_signals_impl(tid : UInt64) : Void _godot_bind_static_signals_impl, _godot_call_tool_button(button_name : String) : Void _godot_call_tool_button, _godot_call_virtual(method_name : String, delta : Float64) : Void _godot_call_virtual, _godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void _godot_call_virtual_with_data, _godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void _godot_get_property, _godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void _godot_set_property, _mark_destroyed_by_engine! : Void _mark_destroyed_by_engine!, _physics_process(delta : Float64) : Void _physics_process, _process(delta : Float64) : Void _process, _ready : Void _ready, ~ : self ~, active? : Bool active?, add_user_signal(signal : String, arguments : Pointer(Void)) : Void add_user_signal, alive? : Bool alive?, as_a(type : T.class) : T forall T as_a, as_a?(type : T.class) : T | Nil forall T as_a?, as_g(type : T.class) : T forall T as_g, as_g?(type : T.class) : T | Nil forall T as_g?, as_t(type : T.class) : T forall T as_t, as_t?(type : T.class) : T | Nil forall T as_t?, await_signal(signal_name : String | Symbol, timeout_sec : Float64 | Nil = nil) : AwaitStatus(Array(Variant))
await_signal(signal_name : String | Symbol, timeout_sec : Number) : AwaitStatus(Array(Variant)) await_signal, await_signal!(signal_name : String | Symbol, timeout_sec : Float64 | Nil = nil) : Array(Variant)
await_signal!(signal_name : String | Symbol, timeout_sec : Number) : Array(Variant) await_signal!, await_signal?(signal_name : String | Symbol, timeout_sec : Float64 | Nil = nil) : Array(Variant) | Nil
await_signal?(signal_name : String | Symbol, timeout_sec : Number) : Array(Variant) | Nil await_signal?, bind_property_list_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R
bind_property_list_changed(once : Bool = false, &block : -> Void) : UInt64 bind_property_list_changed, bind_script_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R
bind_script_changed(once : Bool = false, &block : -> Void) : UInt64 bind_script_changed, bind_static_signal(signal_name : String, callback : Proc(*T, R), once : Bool = false) : UInt64 forall T, R
bind_static_signal(signal_name : Symbol, callback : Proc(*T, R), once : Bool = false) : UInt64 forall T, R bind_static_signal, blocking_signals? : Bool blocking_signals?, build(&block : self -> Void) : self build, call(method : String, args : Array(Variant)) : Pointer(Void)
call(method : String, *args) : Pointer(Void) call, call_bool(method : String, *args) : Bool call_bool, call_deferred(method : String, *args) : Pointer(Void) call_deferred, call_f64(method : String, *args) : Float64 call_f64, call_i64(method : String, *args) : Int64 call_i64, call_obj(method : String, *args) : Node | Nil call_obj, call_obj_as(type : T.class, method : String, *args) : T | Nil forall T call_obj_as, call_str(method : String, *args) : String call_str, callv(method : String, arg_array : Pointer(Void)) : Pointer(Void) callv, can_translate_messages : Bool can_translate_messages, can_translate_messages? : Bool can_translate_messages?, cancel_free : Void cancel_free, cast_to(type : T.class) : T forall T cast_to, cast_to?(type : T.class) : T | Nil forall T cast_to?, check_alive! : Void check_alive!, class?(godot_class : String) : Bool class?, configure(&block : self -> Void) : self configure, connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, callback : Proc(Array(Variant), Void) | Nil = nil, receiver : Godot::Object | Nil = nil) : SignalSubscription
connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, receiver : Godot::Object | Nil = nil, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : String, listener_target : Godot::Object, method_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None) : SignalSubscription
connect(signal : String, callable : Pointer(Void), flags : Int64 = 0_i64) : Godot::Error connect, connect_one_shot(signal_name : String, &block : Array(Variant) -> Void) : SignalSubscription connect_one_shot, connected?(signal : String, callable : Pointer(Void)) : Bool connected?, destroy : Void destroy, destroyed? : Bool destroyed?, disconnect(signal : String, callable : Pointer(Void)) : Void
disconnect(signal_name : String) : Void
disconnect(signal_name : Symbol) : Void disconnect, disconnect_all(signal_name : String | Symbol) : self
disconnect_all : self disconnect_all, editor_hint? : Bool editor_hint?, emit(signal_name : String | Symbol, *args) : self
emit(signal : BoundSignal, *args) : self emit, emit_property_list_changed : Void emit_property_list_changed, emit_script_changed : Void emit_script_changed, emit_signal(name : String) : Void
emit_signal(name : String, *args) : Void emit_signal, emit_static_signal(signal_name : String, *args : *T) : Int32 forall T
emit_static_signal(signal_name : Symbol, *args : *T) : Int32 forall T emit_static_signal, explicitly_freed? : Bool explicitly_freed?, frame_arena : Lapis::Core::FrameArena frame_arena, frame_buffer(type : T.class, max_elements : Int32) : Lapis::Core::ArenaBuffer(T) forall T frame_buffer, frame_scope(&block : Lapis::Core::FrameArena -> _) frame_scope, frame_slice(type : T.class, count : Int32) : Slice(T) forall T frame_slice, free : Void free, get(property : String) : Pointer(Void) get, get_class : String get_class, get_incoming_connections : Pointer(Void) get_incoming_connections, get_indexed(property_path : NodePath | String) : Pointer(Void) get_indexed, get_instance_id : Int64 get_instance_id, get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(key : Symbol, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(key : Symbol, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void) get_meta, get_meta_color(key : String | Symbol) : Color get_meta_color, get_meta_f64(key : String | Symbol) : Float64 get_meta_f64, get_meta_i64(key : String | Symbol) : Int64 get_meta_i64, get_meta_list : Pointer(Void) get_meta_list, get_meta_str(key : String | Symbol) : String get_meta_str, get_meta_transform3d(key : String | Symbol) : Transform3D get_meta_transform3d, get_meta_vector2(key : String | Symbol) : Vector2 get_meta_vector2, get_meta_vector3(key : String | Symbol) : Vector3 get_meta_vector3, get_method_argument_count(method : String) : Int64 get_method_argument_count, get_method_list : Pointer(Void) get_method_list, get_property_list : Pointer(Void) get_property_list, get_script : Pointer(Void) get_script, get_signal_connection_list(signal : String) : Pointer(Void) get_signal_connection_list, get_signal_list : Pointer(Void) get_signal_list, get_translation_domain : String get_translation_domain, godot_as(type : T.class) : T forall T godot_as, godot_as?(type : T.class) : T | Nil forall T godot_as?, has_connections(signal : String) : Bool has_connections, has_connections?(signal : String) : Bool has_connections?, has_meta(name : String) : Bool
has_meta(key : String | Symbol) : Bool has_meta, has_meta?(name : String) : Bool has_meta?, has_method(method : String) : Bool has_method, has_method?(method : String) : Bool has_method?, has_signal(signal : String) : Bool has_signal, has_signal?(signal_name : String) : Bool has_signal?, has_user_signal(signal : String) : Bool has_user_signal, has_user_signal?(signal : String) : Bool has_user_signal?, hash(hasher) hash, if_alive : self | Nil if_alive, inspect(io : IO) : Void inspect, instance_id : UInt64 instance_id, is_blocking_signals : Bool is_blocking_signals, is_blocking_signals? : Bool is_blocking_signals?, is_class(godot_class : String) : Bool is_class, is_class?(godot_class : String) : Bool is_class?, is_connected(signal : String, callable : Pointer(Void)) : Bool is_connected, is_connected?(signal : String, callable : Pointer(Void)) : Bool is_connected?, is_queued_for_deletion : Bool is_queued_for_deletion, is_queued_for_deletion? : Bool is_queued_for_deletion?, is_valid? : Bool is_valid?, link_class_script : Void link_class_script, not_null? : Bool not_null?, notification(what : Int64, reversed : Bool = false) : Void notification, notify_property_list_changed : Void notify_property_list_changed, null? : Bool null?, pointer : Pointer(Void) pointer, pointer=(val : Pointer(Void)) pointer=, print(*args) print, printerr(*args) printerr, property_can_revert(property : String) : Bool property_can_revert, property_can_revert?(property : String) : Bool property_can_revert?, property_get_revert(property : String) : Pointer(Void) property_get_revert, property_list_changed : Godot::TypedSignal() property_list_changed, property_list_changed=(val : Godot::BoundSignal) : Godot::BoundSignal property_list_changed=, property_list_changed_signal_hash : UInt64 property_list_changed_signal_hash, property_list_changed_slot : Lapis::Core::StaticSignalSlot() property_list_changed_slot, puts(*args) puts, queued_for_deletion? : Bool queued_for_deletion?, queued_for_deletion_fast? : Bool queued_for_deletion_fast?, rebind_static_signals! : Void rebind_static_signals!, remove_meta(name : String) : Void
remove_meta(key : String | Symbol) : Void remove_meta, remove_user_signal(signal : String) : Void remove_user_signal, script_changed : Godot::TypedSignal() script_changed, script_changed=(val : Godot::BoundSignal) : Godot::BoundSignal script_changed=, script_changed_signal_hash : UInt64 script_changed_signal_hash, script_changed_slot : Lapis::Core::StaticSignalSlot() script_changed_slot, set(property : String, value : Pointer(Void)) : Void
set(property : String | Symbol, value : T) : Void forall T set, set_block_signals(enable : Bool) : Void set_block_signals, set_deferred(property : String, value : Pointer(Void)) : Void set_deferred, set_indexed(property_path : NodePath | String, value : Pointer(Void)) : Void set_indexed, set_message_translation(enable : Bool) : Void set_message_translation, set_meta(key : String | Symbol, value : String | Int32 | Int64 | Float32 | Float64 | Bool | Symbol | Vector2 | Vector2i | Vector3 | Vector3i | Color | Transform3D | Basis | AABB | Quaternion | Plane | Rect2) : Void
set_meta(key : String | Symbol, value : Godot::Object) : Void
set_meta(name : String, value : Pointer(Void)) : Void
set_meta(key : Symbol, value : Pointer(Void)) : Void
set_meta(key : String | Symbol, value : Variant) : Void set_meta, set_script(script : Pointer(Void)) : Void set_script, set_translation_domain(domain : String) : Void set_translation_domain, signal(name : String) : Godot::BoundSignal
signal(sym : Symbol) : Godot::BoundSignal signal, signal_connection_count(signal_name : String) : Int32 signal_connection_count, signal_target_id : UInt64 signal_target_id, static_signal_slot(signal_name : String, *types : *T) forall T
static_signal_slot(signal_name : Symbol, *types : *T) forall T static_signal_slot, to_s(io : IO) : Void to_s, to_string : String to_string, to_unsafe : Pointer(Void) to_unsafe, tr(message : String, context : String = "") : String tr, tr_n(message : String, plural_message : String, n : Int64, context : String = "") : String tr_n, try? : self | Nil
try?(&) try?, unbind_property_list_changed(callback : Proc(R)) : Bool forall R
unbind_property_list_changed(token : UInt64) : Bool unbind_property_list_changed, unbind_script_changed(callback : Proc(R)) : Bool forall R
unbind_script_changed(token : UInt64) : Bool unbind_script_changed, unbind_static_signal(signal_name : String, callback : Proc(*T, R)) : Bool forall T, R
unbind_static_signal(signal_name : Symbol, callback : Proc(*T, R)) : Bool forall T, R
unbind_static_signal(token : UInt64) : Bool unbind_static_signal
Constructor methods inherited from class Godot::Object
~ : self
~,
create : selfcreate(&block : self -> ) : self create, new(pointer : Pointer(Void) = Pointer(Void).null)
new(&block : self -> ) : self new
Class methods inherited from class Godot::Object
_godot_has_virtual_method(method_name : String) : Bool
_godot_has_virtual_method,
cast_to(obj : Object, type : T.class) : T forall T
cast_to,
cast_to?(obj : Object, type : T.class) : T | Nil forall T
cast_to?,
find_script_info_for_node(node : Godot::Object) : NamedTuple(path: String, line: Int32, class_name: String, parent_name: String, is_tool: Bool) | Nil
find_script_info_for_node,
find_script_location_for_class(target_cls : String) : Tuple(String, Int32)
find_script_location_for_class,
find_script_path_for_class(target_cls : String) : String
find_script_path_for_class,
is_instance_id_valid(id : Int | UInt64) : Bool
is_instance_id_valid,
is_internal_or_brush_class?(cls_name : String) : Bool
is_internal_or_brush_class?
Instance methods inherited from class Object
try?(&)try? try?
Constructor Detail
Class unary ~ returns typed instance looked up from active NodeContext (by name first, then searching children)
Instantiates a PackedScene (.tscn) from path or scene instance directly as this Node type. When cached is true (default), leverages PreloadCache to prevent redundant disk I/O.
Instantiates a PackedScene (.tscn) from path or scene instance directly as this Node type and configures it in a block.
Class Method Detail
Attempts to downcast or wrap this node as type T. Returns nil if node does not inherit from T.
Decomposes a raw path string, stripping leading '$' and extracting unique root prefix if present. Returns {is_unique, root_name, subpath}
Safe nilable variant: instantiates a PackedScene directly as this Node type, returning nil on load failure or type mismatch.
Safe nilable variant configuring the instance in a block when not nil.
Instance Method Detail
Scene Unique Node operator (mirrors GDScript %): node % "HealthBar"
Multi-node typed wildcard glob query operator: self * {"Node/*/Mesh", MeshInstance3D}
Multi-node typed regex query operator: self * {/^HitBox_\d+$/, Area3D}
Multi-node wildcard glob query operator: self * "Node/*/Mesh"
Path traversal operator: node / "Camera3D" or node / node_path!("Camera3D")
Appends child to this node, enabling fluent chaining (parent << child1 << child2)
Multi-node typed glob query returning Array(T)
Typed path lookup: self["Visuals/Sprite2D", Sprite2D]
Flexible type-first overloads for Array(T)
Flexible type-first overload: self[Sprite2D, "Visuals/Sprite2D"]
Indexer syntactic sugar for retrieving a child node by path (e.g. self["Camera3D"])
Type-inferred typed indexer: self[Sprite2D] -> looks up "Sprite2D" cast to Sprite2D
Safe multi-node typed glob query returning nil if the result array would have been empty
Safe typed path lookup: self["Visuals/Sprite2D", Sprite2D]?
Safe flexible type-first overload: self[Sprite2D, "Visuals/Sprite2D"]?
Safe indexer returning nil if node not found (e.g. self["Camera3D"]?)
Safe type-inferred indexer: self[Sprite2D]? -> returns Sprite2D? or nil if not found
Overload: Instantiates a Node of class T, configures it in block, adds it as child, and returns it.
Overload: Instantiates a Node of class T, adds it as child, and returns it.
Overload: Instantiates a PackedScene as Node, adds it as child, and returns it.
Adds a child node. Falls back to local children array when running standalone. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree. Returns concrete instance type T for seamless chaining and assignment.
Overload: Instantiates a PackedScene as Node, configures it in block, adds it as child, and returns it.
Overload: Adds an existing child node, configures it in block, and returns concrete instance type T.
Overload: Instantiates a scene at path or PackedScene as type T, configures in block, adds as child, and returns it.
Overload: Instantiates a PackedScene as type T, configures it in block, adds it as child, and returns it.
Overload: Instantiates a scene at path or PackedScene as type T, adds as child, and returns it.
Overload: Instantiates a PackedScene as type T, adds it as child, and returns it.
Overload: Loads scene at path, instantiates as type T, configures in block, adds as child, and returns it.
Overload: Loads scene at path, instantiates as type T, adds as child, and returns it.
Overload: Instantiates a Node of class T, configures it in block, adds it as sibling, and returns it.
Overload: Instantiates a Node of class T, adds it as sibling, and returns it.
Overload: Instantiates a PackedScene as Node, adds it as sibling, and returns it.
Overload: Instantiates a PackedScene as Node, configures it in block, adds it as sibling, and returns it.
Overload: Adds an existing sibling node, configures it in block, and returns concrete type T.
Overload: Instantiates a scene at path or PackedScene as type T, configures in block, adds as sibling, and returns it.
Overload: Instantiates a PackedScene as type T, configures it in block, adds it as sibling, and returns it.
Overload: Instantiates a scene at path or PackedScene as type T, adds as sibling, and returns it.
Overload: Instantiates a PackedScene as type T, adds it as sibling, and returns it.
Overload: Loads scene at path, instantiates as type T, configures in block, adds as sibling, and returns it.
Overload: Loads scene at path, instantiates as type T, adds as sibling, and returns it.
Adds this node to the specified group (with default non-persistent flag)
Schedules a one-shot delay scoped to this node's lifecycle
Walks up the parent hierarchy to find the nearest ancestor of type T, raising NodeNotFoundError if not found.
Walks up the parent hierarchy to find the nearest ancestor matching the pattern and type.
Walks up the parent hierarchy to find the nearest ancestor of type T, returning nil if not found.
Walks up the parent hierarchy to find the nearest ancestor matching pattern.
Returns an Array containing all ancestor nodes up to the root cast to type T.
Returns true if Godot currently has this parent node locked (data.blocked > 0) while propagating
#_enter_tree or #_ready to its descendants, during which synchronous #add_child fails in Godot.
Changes running scene to PackedScene via the active SceneTree
Identity setter enabling compound operator sugar (node.child_entered_tree += ->handler, node.child_entered_tree -= ->handler)
Identity setter enabling compound operator sugar (node.child_exiting_tree += ->handler, node.child_exiting_tree -= ->handler)
Identity setter enabling compound operator sugar (node.child_order_changed += ->handler, node.child_order_changed -= ->handler)
Removes and frees all child nodes under this node.
Returns the current running scene cast to wrapper type T
Explicit cross-thread helper that safely defers addition via Godot's MessageQueue
Explicit cross-thread helper that safely defers moving child via Godot's MessageQueue
Explicit cross-thread helper that safely queues deletion via Godot's MessageQueue
Explicit cross-thread helper that safely defers removal via Godot's MessageQueue
Explicit cross-thread helper that safely defers reparenting via Godot's MessageQueue
Returns all descendant nodes of this node matching or cast to type T.
Yields each child node without allocating an intermediate array.
Streaming iteration over all descendants cast to type T with receiver and argument scoping.
Example:
each_descendant(Light3D) do
light_energy = 0.0_f32
end
Streaming iteration over all descendants with receiver and argument scoping.
Uses with node yield node to provide receiver scoping, block parameters, or block-pass shorthand.
Examples:
# Receiver scoping:
each_descendant do
hide if is_a?(Godot::VisualInstance3D)
end
# Block-pass shorthand:
each_descendant(&.queue_free)
Streams through all nodes matching pattern, scoping each node as both self and the block argument.
Uses with node yield node, allowing three distinct calling styles:
- Receiver-scoped block (implicit
selfdispatch):each_node("Enemies/*") do queue_free end - Block parameter syntax:
each_node("Enemies/*") do |enemy| enemy.queue_free end - Block-pass shorthand:
each_node("Enemies/*", &.queue_free)
Streams through all nodes matching pattern cast to type T, scoping each node as both self and the block argument.
Identity setter enabling compound operator sugar (node.editor_description_changed += ->handler, node.editor_description_changed -= ->handler)
Identity setter enabling compound operator sugar (node.editor_state_changed += ->handler, node.editor_state_changed -= ->handler)
Schedules a recurring timer scoped to this node's lifecycle
Searches upward in the scene hierarchy (through parents) for an ancestor of type T. Returns the ancestor cast to T, or nil if not found.
Searches upward in the scene hierarchy for an ancestor of type T. Raises NodeNotFoundError if not found.
Finds an existing child node matching pattern.
Finds the first child or descendant matching the regex pattern
Finds child node matching pattern, returning nil if not found
Finds child node matching pattern and casts to T, returning nil if not found
Alias for find_child(regex)
Finds all children or descendants matching the regex pattern
Alias for find_children(regex)
Returns the first child node cast to type T, or nil if none found.
Returns the first node matching pattern, raising NodeNotFoundError if not found.
Returns the first node matching pattern cast to type T, raising NodeNotFoundError if not found.
Returns the first node matching pattern, or nil if none found.
Returns the first node matching pattern cast to type T, or nil if none found or type mismatch.
Returns the first node in the given group cast to type T, raising NodeNotFoundError if none found.
Returns the first node in the given group, raising NodeNotFoundError if none found.
Returns the first node in the given group cast to type T, or nil if none found.
Returns the first node in the given group, or nil if none found.
Returns the child node at index idx.
Falls back to local standalone children list when unparented/headless.
Retrieves child at specified index, or nil if not found
Retrieves child at specified index cast to type T, or nil if not found or not matching type
Returns the number of child nodes belonging to this node. Falls back to local standalone children list when unparented/headless.
Returns an Array containing all child nodes belonging to this node.
Returns all children of this node matching or cast to type T.
Retrieves a child or sibling node by NodePath string. Returns the Node if found, or produces an error if the node does not exist.
Retrieves a child or sibling node by NodePath string, or returns nil if not found. Transparently supports leading '$', scene-unique '%' prefixes, '%UniqueRoot/sub/path', and wildcard patterns.
Retrieves a child node cast to the specified Crystal class type T.
Returns the node cast to T, or produces an error if the node does not exist or cannot be cast.
Retrieves a child node cast to the specified Crystal class type T, or nil if not found or type mismatch.
Fetches a node by String path. Similar to #get_node, but returns nil if path does not point to a valid node.
Returns all child/descendant nodes matching the glob pattern.
Example:
all_coins = get_nodes("Coins/*")
Returns all nodes matching the glob pattern filtered and cast to Array(T).
Only nodes inheriting from or matching type T are returned.
Example:
enemies = get_nodes("Enemies/*", Enemy)
enemies.each(&.alert!)
Instance convenience delegator for static method #get_orphan_node_ids
Returns the parent Node. Falls back to local standalone parents map when running without engine host.
Returns the parent node cast to T, or nil if parent is not of type T or is null
Predicate alias for #get_scene_instance_load_placeholder
Returns the SceneTree containing this node, or nil if not inside the tree
Returns the scene unique node with name %unique_name cast to T
Returns the viewport this node is attached to, or nil if detached/orphan
Returns a fluent GroupQuery for the specified node group.
Returns true if this node belongs to the given node group.
Returns true if this node belongs to the given node group specified as a Symbol.
Returns true if this node belongs to the given node group specified as String or Symbol.
Returns true if this node belongs to any of the specified groups.
Supports both String and Symbol identifiers interchangeably.
Examples:
if enemy.in_group?(:bosses, :minions)
trigger_combat_music
end
Predicate alias for #is_physics_interpolated_and_enabled
Predicate alias for #is_processing_unhandled_key_input
Returns the last child node cast to type T, or nil if none found.
Moves child node to a new index in the parent's child list. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.
Returns the next sibling node cast to type T, or nil if none found.
Returns the next sibling node in the parent's child list, or nil if this is the last child or an orphan.
Shorthand for get_node_as?
Returns all nodes in the given group from the active scene tree (or local subtree in standalone mode) cast to type T.
Returns all nodes in the given group from the active scene tree (or local subtree in standalone mode) as Array(Node).
Predicate alias for #is_physics_interpolated_and_enabled
Context-aware one-shot audio playback helper on Node
Returns the previous sibling node cast to type T, or nil if none found.
Returns the previous sibling node in the parent's child list, or nil if this is the first child or an orphan.
Instance convenience delegator for static method #print_orphan_nodes
Deallocates node cleanly at frame end on the Main Thread. Enforces thread-safety: off-thread calls on SceneTree nodes either raise ThreadAffinityError or auto-defer.
Identity setter enabling compound operator sugar (node.ready += ->handler, node.ready -= ->handler)
Removes a child node. Falls back to local children array when running standalone. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.
Removes this node from its parent if currently inside a parent hierarchy.
Identity setter enabling compound operator sugar (node.renamed += ->handler, node.renamed -= ->handler)
Reparents this node to a new parent. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.
Replaces this node with another node in the tree. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.
Identity setter enabling compound operator sugar (node.replacing_by += ->handler, node.replacing_by -= ->handler)
Calls an RPC method on this node across the multiplayer network.
Calls an RPC method on a specific peer ID across the multiplayer network.
Traverses upward starting from self, returning the first node matching type T, or raising NilAssertionError.
Traverses upward starting from self, returning the first node matching type T, or nil if none found.
Returns all sibling nodes cast to type T, excluding this node.
Returns all sibling nodes sharing this node's parent, excluding this node.
Spawns a child node of type T, configures it in a block, and attaches it to this node
Spawns a child node of type T and attaches it to this node
Walks upward to find the topmost ancestor node, or the SceneTree root if attached.
Identity setter enabling compound operator sugar (node.tree_entered += ->handler, node.tree_entered -= ->handler)
Identity setter enabling compound operator sugar (node.tree_exited += ->handler, node.tree_exited -= ->handler)
Identity setter enabling compound operator sugar (node.tree_exiting += ->handler, node.tree_exiting -= ->handler)
Shorthand for retrieving a scene unique node cast to type T
Safe shorthand for retrieving a scene unique node cast to type T, or nil if not found or type mismatch