Godot(_:)

    Creates the definition for a Swift class to be surfaced to Godot.

    MacroDefs.swift:22
    @attached(member, names: named(_initializeClass), named(classInitializer), named(implementedOverrides)) macro Godot(_ behavior: ClassBehavior = .gameplay)

    Parameters

    behavior

    using .tool value makes the overridden methods like _ready or _process run in editor, making the class work like @tool annotated script in GDScript

    This macro creates the required constructors that the SwiftGodot framework requires (the init, and the init(nativeHandle:)) , ensures that both of those initialize the class if required, and registers any @Export and @Callable methods for the class effectively surfacing properties and methods to godot