Wrapped

    The base class for all class bindings in Godot, you should not have to instantiate or subclass this class directly - there are better options in the hierarchy.

    Wrapped.swift:76
    class Wrapped

    Wrapped implements Equatable based on an identity based on the pointer to the Godot native object and also implements the Identifiable protocol using this pointer.

    Wrapped subclasses come in two forms: straight bindings to the Godot API which are used to expose capabilities to developers. These objects, referred to as Framework types do not have any additional state associated in Swift, so they can be discarded or recreated as many times as it is needed.

    When user subclass Wrapped, they might have state associated with them, so those objects are preserved and are not thrown away until they are explicitly relinquished by both Godot and any references you might hold to them. These are known as User types.

    Any subclass ends up calling the Wrapped(StringName) constructor which provides the name of the most-derived framework type, and this constructor determines whether this is a Framework type or a user type.

    To register User types with the framework make sure you call the register<T:Wrapped> (type: T.Type) method like this:

    register (type: MySpinningCube.self)

    If you do not call this method, many of the overloads that Godot would call you back on will not be invoked.

    Citizens in SwiftGodot

    Conformances

    Type members

    Instance members

    Type features

    Subclasses