annotation Autoload

Overview

Marks a node class as an Autoload singleton, automatically instantiating it, registering it with Godot's Engine singleton registry, and mounting it to the SceneTree root.

@[Autoload]
node GameManager < Node do
  property score : Int32 = 0
end

Defined in:

libgodot/macros/annotations.cr