Replace remaining references to `ClassDB::register_class()` with `GDREGISTER_CLASS()`
parent
3644c3e0cf
commit
39b718f7fc
|
@ -22,7 +22,7 @@ For getting started after cloning your own copy to your local machine, you shoul
|
||||||
* change the pathnames of the to be loaded library name inside the `demo/bin/example.gdextension` file. By replacing `libgdexample` to the name specified in your `SConstruct` file.
|
* change the pathnames of the to be loaded library name inside the `demo/bin/example.gdextension` file. By replacing `libgdexample` to the name specified in your `SConstruct` file.
|
||||||
* change the name of the `demo/bin/example.gdextension` file
|
* change the name of the `demo/bin/example.gdextension` file
|
||||||
* change the `entry_symbol` string inside your `demo/bin/your-extension.gdextension` file to be configured for your GDExtension name. This should be the same as the `GDExtensionBool GDE_EXPORT` external C function. As the name suggests, this sets the entry function for your GDExtension to be loaded by the Godot editors C API.
|
* change the `entry_symbol` string inside your `demo/bin/your-extension.gdextension` file to be configured for your GDExtension name. This should be the same as the `GDExtensionBool GDE_EXPORT` external C function. As the name suggests, this sets the entry function for your GDExtension to be loaded by the Godot editors C API.
|
||||||
* register the classes you want Godot to interact with inside the `register_types.cpp` file in the initialization method (here `initialize_gdextension_types`) in the syntax `ClassDB::register_class<CLASS-NAME>();`.
|
* register the classes you want Godot to interact with inside the `register_types.cpp` file in the initialization method (here `initialize_gdextension_types`) in the syntax `GDREGISTER_CLASS(CLASS-NAME);`.
|
||||||
|
|
||||||
## Usage - Actions
|
## Usage - Actions
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level)
|
||||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ClassDB::register_class<YourClass>();
|
//GDREGISTER_CLASS(YourClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {
|
void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {
|
||||||
|
|
Loading…
Reference in New Issue