From 39b718f7fc9026a5401dd62e69099c2331ffd6c0 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Sun, 29 Sep 2024 12:42:26 -0500 Subject: [PATCH] Replace remaining references to `ClassDB::register_class()` with `GDREGISTER_CLASS()` --- README.md | 2 +- src/register_types.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01de45a..673595a 100644 --- a/README.md +++ b/README.md @@ -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();`. +* 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 diff --git a/src/register_types.cpp b/src/register_types.cpp index 2c86044..9f43623 100644 --- a/src/register_types.cpp +++ b/src/register_types.cpp @@ -11,7 +11,7 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level) if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; } - //ClassDB::register_class(); + //GDREGISTER_CLASS(YourClass); } void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {