diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index ad8f21785d5..07e4048c120 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -883,6 +883,8 @@ static void _initialize_java_modules() { ERR_EXPLAIN("Couldn't find proper initialize function 'public static Godot.SingletonBase Class::initialize(Activity p_activity)' initializer for singleton class: " + m); ERR_CONTINUE(!initialize); } + jobject obj = env->CallStaticObjectMethod(singletonClass, initialize, _godot_instance); + env->NewGlobalRef(obj); } } }