You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add signal support to Godot Android plugin:
Supports registering and emitting signal from a Godot Android plugin
This commit is contained in:
@@ -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<JNISingleton>();
|
||||
#endif
|
||||
|
||||
ClassDB::register_class<JavaClass>();
|
||||
|
||||
Reference in New Issue
Block a user