forked from Sara.Sync/godot-cpp-template
Compare commits
2 Commits
6881f8e84a
...
8af2858e39
Author | SHA1 | Date |
---|---|---|
Sara | 8af2858e39 | |
Sara | f91feba86d |
|
@ -1,4 +1,5 @@
|
||||||
#include "register_types.h"
|
#include "register_types.h"
|
||||||
|
#include "utils/register_types.hpp"
|
||||||
#include <gdextension_interface.h>
|
#include <gdextension_interface.h>
|
||||||
#include <godot_cpp/core/class_db.hpp>
|
#include <godot_cpp/core/class_db.hpp>
|
||||||
#include <godot_cpp/core/defs.hpp>
|
#include <godot_cpp/core/defs.hpp>
|
||||||
|
@ -11,14 +12,9 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level)
|
||||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
godot_cpp_utils_register_types();
|
||||||
}
|
}
|
||||||
|
|
||||||
//void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {
|
|
||||||
// if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
|
@ -26,7 +22,6 @@ extern "C"
|
||||||
{
|
{
|
||||||
GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
|
GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
|
||||||
init_obj.register_initializer(initialize_gdextension_types);
|
init_obj.register_initializer(initialize_gdextension_types);
|
||||||
// init_obj.register_terminator(uninitialize_gdextension_types);
|
|
||||||
init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);
|
init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);
|
||||||
|
|
||||||
return init_obj.init();
|
return init_obj.init();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7bdb5e70eb1138c898f4f7382d2906ad6528090f
|
Subproject commit 54fcbcbb6bea3f086b751d80faca1700dba28a51
|
Loading…
Reference in New Issue