mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Remove the restriction on supported types for Godot Android plugins
The Android plugin implementation is updated to use `JavaClassWrapper` which was fixed in https://github.com/godotengine/godot/pull/96182, thus removing the limitation on supported types. Note that `JavaClassWrapper` has also been updated in order to only provide access to public methods and constructor to GDScript.
This commit is contained in:
parent
1fc8208765
commit
07cae26abe
6 changed files with 50 additions and 207 deletions
|
|
@ -262,6 +262,8 @@ class JavaClassWrapper : public Object {
|
|||
bool _get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, String &strsig);
|
||||
#endif
|
||||
|
||||
Ref<JavaClass> _wrap(const String &p_class, bool p_allow_private_methods_access);
|
||||
|
||||
static JavaClassWrapper *singleton;
|
||||
|
||||
protected:
|
||||
|
|
@ -270,15 +272,14 @@ protected:
|
|||
public:
|
||||
static JavaClassWrapper *get_singleton() { return singleton; }
|
||||
|
||||
Ref<JavaClass> wrap(const String &p_class);
|
||||
Ref<JavaClass> wrap(const String &p_class) {
|
||||
return _wrap(p_class, false);
|
||||
}
|
||||
|
||||
#ifdef ANDROID_ENABLED
|
||||
Ref<JavaClass> wrap_jclass(jclass p_class);
|
||||
|
||||
JavaClassWrapper(jobject p_activity = nullptr);
|
||||
#else
|
||||
JavaClassWrapper();
|
||||
Ref<JavaClass> wrap_jclass(jclass p_class, bool p_allow_private_methods_access = false);
|
||||
#endif
|
||||
JavaClassWrapper();
|
||||
};
|
||||
|
||||
#endif // JAVA_CLASS_WRAPPER_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue