module
Godot::AutoloadManager
Overview
Manages the lifecycle, Engine singleton registration, SceneTree root mounting, and hot-reload teardown for all user-defined @[Autoload] nodes.
Extended Modules
Defined in:
libgodot/autoload.crInstance Method Summary
-
#[](name : String) : Record
Returns the autoload Record for the given name, or raises KeyError if not registered
-
#[]?(name : String) : Record | Nil
Returns the autoload Record for the given name, or nil if not registered
-
#has_autoload?(name : String) : Bool
Returns true if an autoload record exists for the given name
-
#mount_to_tree(target_tree : SceneTree | Nil = nil) : Void
Mounts any pending autoload nodes to the SceneTree root (/root/
) if not already mounted. -
#mounted? : Bool
Returns true if all registered autoload nodes requiring SceneTree mounting have been mounted
-
#records : Array(Record)
Returns all active autoload records
-
#setup_autoloads : Void
Initializes and instantiates all registered @[Autoload] classes.
-
#size : Int32
Returns the total count of registered autoload nodes
-
#teardown_autoloads : Void
Tears down all autoload nodes: unregisters them from Engine, removes them from SceneTree, clears references, and ensures no dead-pointer or DLL unload crashes occur.
Instance Method Detail
Returns the autoload Record for the given name, or raises KeyError if not registered
Returns the autoload Record for the given name, or nil if not registered
Returns true if an autoload record exists for the given name
Mounts any pending autoload nodes to the SceneTree root (/root/
Returns true if all registered autoload nodes requiring SceneTree mounting have been mounted
Initializes and instantiates all registered @[Autoload] classes. Registers each node with Godot's Engine singleton registry (if singleton: true) and sets the typed Class.instance accessor.
Tears down all autoload nodes: unregisters them from Engine, removes them from SceneTree, clears references, and ensures no dead-pointer or DLL unload crashes occur.