Skip to content

Commit fccb2b9

Browse files
authored
Merge pull request #52 from dsnopek/gdregister-class
2 parents 326b4db + 39b718f commit fccb2b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For getting started after cloning your own copy to your local machine, you shoul
2222
* 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.
2323
* change the name of the `demo/bin/example.gdextension` file
2424
* 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.
25-
* 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>();`.
25+
* 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);`.
2626

2727
## Usage - Actions
2828

src/register_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level)
1111
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
1212
return;
1313
}
14-
//ClassDB::register_class<YourClass>();
14+
//GDREGISTER_CLASS(YourClass);
1515
}
1616

1717
void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {

0 commit comments

Comments
 (0)