forked from goostengine/goost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See godot commit 3d2dd79ecd2c8456ba9401f6b12333d01f61e13e godotengine/godot-proposals#3371 godotengine/godot#60723
- Loading branch information
Showing
10 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
#include "register_types.h" | ||
|
||
#include "core/engine.h" | ||
|
||
#include "core/register_core_types.h" | ||
#include "editor/register_editor_types.h" | ||
#include "scene/register_scene_types.h" | ||
|
||
void register_goost_types() { | ||
void initialize_goost_module(ModuleInitializationLevel p_level) { | ||
#ifdef GOOST_CORE_ENABLED | ||
goost::register_core_types(); | ||
if (p_level == MODULE_INITIALIZATION_LEVEL_CORE) { | ||
goost::register_core_types(); | ||
} | ||
#endif | ||
#ifdef GOOST_SCENE_ENABLED | ||
goost::register_scene_types(); | ||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { | ||
goost::register_scene_types(); | ||
} | ||
#endif | ||
#if defined(TOOLS_ENABLED) && defined(GOOST_EDITOR_ENABLED) | ||
goost::register_editor_types(); | ||
if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { | ||
goost::register_editor_types(); | ||
} | ||
#endif | ||
} | ||
|
||
void unregister_goost_types() { | ||
void uninitialize_goost_module(ModuleInitializationLevel p_level) { | ||
#ifdef GOOST_CORE_ENABLED | ||
goost::unregister_core_types(); | ||
if (p_level == MODULE_INITIALIZATION_LEVEL_CORE) { | ||
goost::unregister_core_types(); | ||
} | ||
#endif | ||
#ifdef GOOST_SCENE_ENABLED | ||
goost::unregister_scene_types(); | ||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { | ||
goost::unregister_scene_types(); | ||
} | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#pragma once | ||
|
||
#include "core/engine.h" | ||
#include "modules/register_module_types.h" | ||
|
||
// Do not include `goost.h` here. | ||
// | ||
// This may lead to clashes with Godot's namespace, or produce include errors | ||
// when `module_goost_enabled=no` is specified via command-line. | ||
|
||
void register_goost_types(); | ||
void unregister_goost_types(); | ||
void initialize_goost_module(ModuleInitializationLevel p_level); | ||
void uninitialize_goost_module(ModuleInitializationLevel p_level); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters