Skip to content

Commit

Permalink
Use GDREGISTER defines in example
Browse files Browse the repository at this point in the history
  • Loading branch information
Repiteo committed Apr 10, 2024
1 parent b021245 commit a537b4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
ClassDB::register_class<Example>();
GDREGISTER_CLASS(Example);
}
```

Expand Down
18 changes: 9 additions & 9 deletions test/src/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
return;
}

ClassDB::register_class<ExampleRef>();
ClassDB::register_class<ExampleMin>();
ClassDB::register_class<Example>();
ClassDB::register_class<ExampleVirtual>(true);
ClassDB::register_abstract_class<ExampleAbstractBase>();
ClassDB::register_class<ExampleConcrete>();
ClassDB::register_class<ExampleBase>();
ClassDB::register_class<ExampleChild>();
ClassDB::register_runtime_class<ExampleRuntime>();
GDREGISTER_CLASS(ExampleRef);
GDREGISTER_CLASS(ExampleMin);
GDREGISTER_CLASS(Example);
GDREGISTER_VIRTUAL_CLASS(ExampleVirtual);
GDREGISTER_ABSTRACT_CLASS(ExampleAbstractBase);
GDREGISTER_CLASS(ExampleConcrete);
GDREGISTER_CLASS(ExampleBase);
GDREGISTER_CLASS(ExampleChild);
GDREGISTER_RUNTIME_CLASS(ExampleRuntime);
}

void uninitialize_example_module(ModuleInitializationLevel p_level) {
Expand Down

0 comments on commit a537b4a

Please sign in to comment.