summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2019-09-19 17:56:13 +1000
committerGitHub <noreply@github.com>2019-09-19 17:56:13 +1000
commit3352abf79e9c3584eb331ba4139a6a366da7089a (patch)
treeea51ed93e13f93fd111d2b01a34245cd02c8c4f2 /src
parent93df07289c1b1cd8a550dec46fa3b3c22d7b2abb (diff)
parent8443486a199868c28fcb7b3b6f240213e5c735fa (diff)
downloadredot-cpp-3352abf79e9c3584eb331ba4139a6a366da7089a.tar.gz
Merge pull request #327 from BastiaanOlij/move_register
Call register types and init earlier
Diffstat (limited to 'src')
-rw-r--r--src/core/GodotGlobal.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/GodotGlobal.cpp b/src/core/GodotGlobal.cpp
index 31be6c8..83cc695 100644
--- a/src/core/GodotGlobal.cpp
+++ b/src/core/GodotGlobal.cpp
@@ -139,6 +139,10 @@ void Godot::gdnative_init(godot_gdnative_init_options *options) {
default: break;
}
}
+
+ // register these now
+ ___register_types();
+ ___init_method_bindings();
}
void Godot::gdnative_terminate(godot_gdnative_terminate_options *options) {
@@ -157,9 +161,6 @@ void Godot::nativescript_init(void *handle) {
binding_funcs.free_instance_binding_data = wrapper_destroy;
godot::_RegisterState::language_index = godot::nativescript_1_1_api->godot_nativescript_register_instance_binding_data_functions(binding_funcs);
-
- ___register_types();
- ___init_method_bindings();
}
void Godot::nativescript_terminate(void *handle) {