Merge pull request #1435 from Repiteo/example-use-defines

Use `GDREGISTER` defines in example
pull/1438/head
David Snopek 2024-04-11 13:38:29 -05:00 committed by GitHub
commit 4b7661a60a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -132,7 +132,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,15 +21,15 @@ 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<ExampleAbstractBase>(); GDREGISTER_ABSTRACT_CLASS(ExampleAbstractBase);
ClassDB::register_class<ExampleConcrete>(); GDREGISTER_CLASS(ExampleConcrete);
ClassDB::register_class<ExampleBase>(); GDREGISTER_CLASS(ExampleBase);
ClassDB::register_class<ExampleChild>(); GDREGISTER_CLASS(ExampleChild);
ClassDB::register_runtime_class<ExampleRuntime>(); GDREGISTER_RUNTIME_CLASS(ExampleRuntime);
} }
void uninitialize_example_module(ModuleInitializationLevel p_level) { void uninitialize_example_module(ModuleInitializationLevel p_level) {