Use `GDREGISTER` defines in example

(cherry picked from commit a537b4af4d)
pull/1441/head
Thaddeus Crews 2024-04-10 13:51:53 -05:00 committed by David Snopek
parent 974e6c6f86
commit 8e5d7c9268
2 changed files with 8 additions and 8 deletions

View File

@ -131,7 +131,7 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return; return;
} }
ClassDB::register_class<Example>(); GDREGISTER_CLASS(Example);
} }
``` ```

View File

@ -21,13 +21,13 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
return; return;
} }
ClassDB::register_class<ExampleRef>(); GDREGISTER_CLASS(ExampleRef);
ClassDB::register_class<ExampleMin>(); GDREGISTER_CLASS(ExampleMin);
ClassDB::register_class<Example>(); GDREGISTER_CLASS(Example);
ClassDB::register_class<ExampleVirtual>(true); GDREGISTER_VIRTUAL_CLASS(ExampleVirtual);
ClassDB::register_abstract_class<ExampleAbstract>(); GDREGISTER_ABSTRACT_CLASS(ExampleAbstract);
ClassDB::register_class<ExampleBase>(); GDREGISTER_CLASS(ExampleBase);
ClassDB::register_class<ExampleChild>(); GDREGISTER_CLASS(ExampleChild);
} }
void uninitialize_example_module(ModuleInitializationLevel p_level) { void uninitialize_example_module(ModuleInitializationLevel p_level) {