From 8443486a199868c28fcb7b3b6f240213e5c735fa Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Sat, 14 Sep 2019 11:24:15 +1000 Subject: [PATCH] Call register types and init earlier --- src/core/GodotGlobal.cpp | 7 ++++--- 1 file 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) {