From 948c3cbb889801cfcb4479366c3c5f96a06c8111 Mon Sep 17 00:00:00 2001 From: fhuya Date: Wed, 25 Mar 2020 14:01:12 -0700 Subject: Add signal support to Godot Android plugin: Supports registering and emitting signal from a Godot Android plugin --- platform/android/api/api.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'platform/android/api/api.cpp') diff --git a/platform/android/api/api.cpp b/platform/android/api/api.cpp index ef11b12971..4fe868d4f0 100644 --- a/platform/android/api/api.cpp +++ b/platform/android/api/api.cpp @@ -32,6 +32,7 @@ #include "core/engine.h" #include "java_class_wrapper.h" +#include "jni_singleton.h" #if !defined(ANDROID_ENABLED) static JavaClassWrapper *java_class_wrapper = nullptr; @@ -40,7 +41,11 @@ static JavaClassWrapper *java_class_wrapper = nullptr; void register_android_api() { #if !defined(ANDROID_ENABLED) + // On Android platforms, the `java_class_wrapper` instantiation and the + // `JNISingleton` registration occurs in + // `platform/android/java_godot_lib_jni.cpp#Java_org_godotengine_godot_GodotLib_setup` java_class_wrapper = memnew(JavaClassWrapper); // Dummy + ClassDB::register_class(); #endif ClassDB::register_class(); -- cgit v1.2.3