Merge pull request #52 from dsnopek/gdregister-class

pull/59/head
Patrick Exner (FlameLizard) 2024-09-29 22:21:52 +02:00 committed by GitHub
commit fccb2b9521
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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 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.
* 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

View File

@ -11,7 +11,7 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level)
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
//ClassDB::register_class<YourClass>();
//GDREGISTER_CLASS(YourClass);
}
void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {