mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +00:00
Add signal support to Godot Android plugin:
Supports registering and emitting signal from a Godot Android plugin
This commit is contained in:
parent
0826b63c7e
commit
948c3cbb88
8 changed files with 480 additions and 188 deletions
|
|
@ -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>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue