GODOT_CLASS
Usage
GODOT_CLASS();
class Example : Node {
GODOT_GENERATED_BODY();
};
Mark the following Class as a target for the code generator. Aditionally the macro parameters can be used to configure the generated registration code.
Available Parameter Types
GOC_GodotClassType
This parameter type is used to set the classes type in the GODOT_CLASS macro parameters.
The following values are available:
Value |
Description |
|---|---|
RegisterCustom |
Do not register this class. Custom registration code needs to be added for this class to be available in engine. |
GodotClass |
Register this class using the GDREGISTER_CLASS macro. This is the default value. |
VirtualClass |
Register this class using the GDREGISTER_VIRTUAL_CLASS macro. |
AbstractClass |
Register this class using the GDREGISTER_ABSTRACT_CLASS macro. |
InternalClass |
Register this class using the GDREGISTER_INTERNAL_CLASS macro. |
RuntimeClass |
Register this class using the GDREGISTER_RUNTIME_CLASS macro. |
GOC_ModuleInitializationLevel
This parameter type is used to set this class initialization level within the GODOT_CLASS macros parameters.
The following values are available:
Value |
Description |
|---|---|
LevelCore |
Register this class in the MODULE_INITIALIZATION_LEVEL_CORE step. |
LevelServers |
Register this class in the MODULE_INITIALIZATION_LEVEL_SERVERS step. |
LevelScene |
Register this class in the MODULE_INITIALIZATION_LEVEL_SCENE step. This is the default value. |
LevelEditor |
Register this class in the MODULE_INITIALIZATION_LEVEL_EDITOR step. |
LevelMax |
This value is invalid and will be removed in future version. |