Attribute Macro gdnative_derive::monomorphize

source ·
#[monomorphize]
Expand description

Wires up necessary internals for a concrete monomorphization of a generic NativeClass, represented as a type alias, so it can be registered.

The monomorphized type will be available to Godot under the name of the type alias, once registered. Automatically registers the type if the inventory feature is enabled on supported platforms.

For more context, please refer to gdnative::derive::NativeClass.

Type attributes

The behavior of the attribute can be customized using additional attributes on the type alias. All type attributes are optional.

#[register_with(path::to::function)]

Use a custom function to register signals, properties or methods, in addition to the one generated by a universal #[methods] block on the generic type. This can be used to register extra mix-ins that apply to the specific monomorphization.