Skip to content

Commit

Permalink
Merge pull request #52 from dsnopek/gdregister-class
Browse files Browse the repository at this point in the history
  • Loading branch information
paddy-exe authored Sep 29, 2024
2 parents 326b4db + 39b718f commit fccb2b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fccb2b9

Please sign in to comment.