class

Godot::Node

Inherits Godot::Object < Reference < Object

Base class for all scene tree nodes in Godot. Provides hierarchy management, node traversal, and lifecycle hooks (_ready, _process, _physics_process).

Constructors

new(pointer : Pointer(Void) = Pointer(Void).null)
Source

Instance methods

[](path : String) : Node

Indexer syntactic sugar for retrieving a child node by path (e.g. self["Camera3D"])

Source
[]?(path : String) : Node | Nil

Safe indexer returning nil if node not found (e.g. self["Camera3D"]?)

Source
_physics_process(delta : Float64) : Void

Fixed-rate physics process callback receiving delta timestep in seconds (Float64).

Source
_process(delta : Float64) : Void

Per-frame process callback receiving delta timestep in seconds (Float64).

Source
_ready

Lifecycle callback called when the node enters the active scene tree.

Source
add_child(node : Node, force_readable_name : Bool = false, internal : Int64 = 0_i64) : Void

Adds a child node with optional force_readable_name and internal mode flags

Source
add_sibling(sibling : Node, force_readable_name : Bool) : Void
Source
add_to_group(group : String, persistent : Bool) : Void
Source
add_to_group(group : String) : Void

Adds this node to the specified group (with default non-persistent flag)

Source
atr(message : String, context : String) : String
Source
atr_n(message : String, plural_message : String, n : Int64, context : String) : String
Source
auto_translate_mode

Property auto_translate_mode getter

Source
auto_translate_mode=(val : Int)

Property auto_translate_mode setter

Source
can_auto_translate
Source
can_process
Source
create_tween
Source
duplicate(flags : Int64) : Node
Source
each_child(include_internal : Bool = false, &block : Node -> Void) : Void

Yields each child node without allocating an intermediate array.

Source
editor_description

Property editor_description getter

Source
editor_description=(val)

Property editor_description setter

Source
find_child(pattern : String, recursive : Bool = true, owned : Bool = false) : Node | Nil

Reliable GDExtension bridge implementation of find_child with default parameters

Source
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

Source
find_children(pattern : String, get_type : String, recursive : Bool, owned : Bool) : Godot::Array
Source
find_parent(pattern : String) : Node
Source
get_accessibility_element
Source
get_auto_translate_mode
Source
get_child(idx : Int64, include_internal : Bool) : Node
Source
get_child(idx : Int, include_internal : Bool = false) : Node

Retrieves child at specified index

Source
get_child?(idx : Int, include_internal : Bool = false) : Node | Nil

Retrieves child at specified index, or nil if not found

Source
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

Source
get_child_count(include_internal : Bool = false) : Int64

Returns the count of children belonging to this node

Source
get_children(include_internal : Bool = false) : Array(Node)

Returns an Array containing all child nodes belonging to this node.

Source
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.

Source
get_editor_description
Source
get_groups
Source
get_index(include_internal : Bool) : Int64
Source
get_last_exclusive_window
Source
get_multiplayer
Source
get_multiplayer_authority
Source
get_name
Source
get_node(path : String) : Node

Retrieves a child or sibling node by NodePath string. Returns the Node if found, or produces an error if the node does not exist.

Source
get_node(path : NodePath) : Node
Source
get_node?(path : String) : Node | Nil

Retrieves a child or sibling node by NodePath string, or returns nil if not found.

Source
get_node_and_resource(path : NodePath) : Godot::Array
Source
get_node_as(type : T.class, path : String) : T forall T

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.

Source
get_node_as?(type : T.class, path : String) : T | Nil forall T

Retrieves a child node cast to the specified Crystal class type T, or nil if not found.

Source
get_node_or_null(path : String) : Node | Nil

Fetches a node by String path. Similar to #get_node, but returns nil if path does not point to a valid node.

Source
get_node_or_null(path : NodePath) : Node
Source
get_node_rpc_config
Source
get_orphan_node_ids
Source
get_owner
Source
get_parent

Returns the parent Node

Source
get_parent?

Returns the parent Node, or nil if orphan

Source
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

Source
get_path
Source
get_path_to(node : Node, use_unique_path : Bool) : NodePath
Source
get_physics_interpolation_mode
Source
get_physics_process_delta_time
Source
get_physics_process_priority
Source
get_process_delta_time
Source
get_process_mode
Source
get_process_priority
Source
get_process_thread_group
Source
get_process_thread_group_order
Source
get_process_thread_messages
Source
get_scene_file_path
Source
get_scene_instance_load_placeholder
Source
get_tree

Returns the SceneTree containing this node.

Source
get_tree_string
Source
get_tree_string_pretty
Source
get_unique_node_as(type : T.class, unique_name : String) : T | Nil forall T

Returns the scene unique node with name %unique_name cast to T

Source
get_viewport
Source
get_window
Source
has_node(path : NodePath) : Bool
Source
has_node_and_resource(path : NodePath) : Bool
Source
in_group?(group_name : String) : Bool

Returns true if this node belongs to the given node group.

Source
inside_tree?

Returns true if this node is currently a member of the active SceneTree.

Source
is_ancestor_of(node : Node) : Bool
Source
is_displayed_folded
Source
is_editable_instance(node : Node) : Bool
Source
is_greater_than(node : Node) : Bool
Source
is_in_group(group : String) : Bool
Source
is_inside_tree

Returns true if the node is currently inside the active scene tree

Source
is_multiplayer_authority
Source
is_node_ready
Source
is_part_of_edited_scene
Source
is_physics_interpolated
Source
is_physics_interpolated_and_enabled
Source
is_physics_processing
Source
is_physics_processing_internal
Source
is_processing
Source
is_processing_input
Source
is_processing_internal
Source
is_processing_shortcut_input
Source
is_processing_unhandled_input
Source
is_processing_unhandled_key_input
Source
is_queued_for_deletion

Checks if this node is queued for deletion

Source
is_unique_name_in_owner
Source
local_groups
Source
move_child(child_node : Node, to_index : Int64) : Void
Source
multiplayer

Property multiplayer getter

Source
name
Source
name=(val : String)
Source
node_as(type : T.class, path : String) : T forall T

Shorthand for get_node_as

Source
node_as?(type : T.class, path : String) : T | Nil forall T

Shorthand for get_node_as?

Source
notify_deferred_thread_group(what : Int64) : Void
Source
notify_thread_safe(what : Int64) : Void
Source
owner

Returns the scene owner node responsible for serialization packing.

Source
owner=(o : Node | Nil)

Sets the scene owner node for serialization packing.

Source
physics_interpolation_mode

Property physics_interpolation_mode getter

Source
physics_interpolation_mode=(val : Int)

Property physics_interpolation_mode setter

Source
process_mode

Property process_mode getter

Source
process_mode=(val : Int)

Property process_mode setter

Source
process_physics_priority

Property process_physics_priority getter

Source
process_physics_priority=(val : Int)

Property process_physics_priority setter

Source
process_priority

Property process_priority getter

Source
process_priority=(val : Int)

Property process_priority setter

Source
process_thread_group

Property process_thread_group getter

Source
process_thread_group=(val : Int)

Property process_thread_group setter

Source
process_thread_group_order

Property process_thread_group_order getter

Source
process_thread_group_order=(val : Int)

Property process_thread_group_order setter

Source
process_thread_messages

Property process_thread_messages getter

Source
process_thread_messages=(val : Int)

Property process_thread_messages setter

Source
propagate_call(method : String, args : Godot::Array, parent_first : Bool) : Void
Source
propagate_notification(what : Int64) : Void
Source
queue_accessibility_update
Source
queue_free

Queues this node for deletion at the end of the current frame

Source
remove_child(node : Node) : Void

Removes a child node from this node without freeing it

Source
remove_from_group(group : String) : Void
Source
reparent(new_parent : Node, keep_global_transform : Bool = true) : Void

Changes the parent of this Node to new_parent

Source
replace_by(node : Node, keep_groups : Bool) : Void
Source
request_ready
Source
reset_physics_interpolation
Source
rpc_config(method : String, config : Pointer(Void)) : Void
Source
scene_file_path

Property scene_file_path getter

Source
scene_file_path=(val)

Property scene_file_path setter

Source
set_auto_translate_mode(mode : Int64) : Void
Source
set_deferred_thread_group(property : String, value : Pointer(Void)) : Void
Source
set_display_folded(fold : Bool) : Void
Source
set_editable_instance(node : Node, is_editable : Bool) : Void
Source
set_editor_description(editor_description : String) : Void
Source
set_multiplayer_authority(id : Int64, recursive : Bool) : Void
Source
set_name(name : String) : Void

Sets the name of the node safely via dynamic reflection

Source
set_owner(owner : Node) : Void
Source
set_physics_interpolation_mode(mode : Int64) : Void
Source
set_physics_process(enable : Bool) : Void
Source
set_physics_process_internal(enable : Bool) : Void
Source
set_physics_process_priority(priority : Int64) : Void
Source
set_process(enable : Bool) : Void
Source
set_process_input(enable : Bool) : Void
Source
set_process_internal(enable : Bool) : Void
Source
set_process_mode(mode : Int64) : Void
Source
set_process_priority(priority : Int64) : Void
Source
set_process_shortcut_input(enable : Bool) : Void
Source
set_process_thread_group(mode : Int64) : Void
Source
set_process_thread_group_order(order : Int64) : Void
Source
set_process_thread_messages(flags : Int64) : Void
Source
set_process_unhandled_input(enable : Bool) : Void
Source
set_process_unhandled_key_input(enable : Bool) : Void
Source
set_scene_file_path(scene_file_path : String) : Void
Source
set_scene_instance_load_placeholder(load_placeholder : Bool) : Void
Source
set_thread_safe(property : String, value : Pointer(Void)) : Void
Source
set_translation_domain_inherited
Source
set_unique_name_in_owner(enable : Bool) : Void
Source
unique_name_in_owner

Property unique_name_in_owner getter

Source
unique_name_in_owner=(val)

Property unique_name_in_owner setter

Source
unique_name_in_owner?
Source
update_configuration_warnings
Source

Nested types