mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +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
				
			
		|  | @ -41,13 +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
 | ||||
| 	// On Android platforms, the `java_class_wrapper` instantiation occurs in
 | ||||
| 	// `platform/android/java_godot_lib_jni.cpp#Java_org_godotengine_godot_GodotLib_setup`
 | ||||
| 	java_class_wrapper = memnew(JavaClassWrapper); // Dummy
 | ||||
| 	GDREGISTER_CLASS(JNISingleton); | ||||
| 	java_class_wrapper = memnew(JavaClassWrapper); | ||||
| #endif | ||||
| 
 | ||||
| 	GDREGISTER_CLASS(JNISingleton); | ||||
| 	GDREGISTER_CLASS(JavaClass); | ||||
| 	GDREGISTER_CLASS(JavaObject); | ||||
| 	GDREGISTER_CLASS(JavaClassWrapper); | ||||
|  | @ -108,7 +106,7 @@ Ref<JavaClass> JavaObject::get_java_class() const { | |||
| 
 | ||||
| JavaClassWrapper *JavaClassWrapper::singleton = nullptr; | ||||
| 
 | ||||
| Ref<JavaClass> JavaClassWrapper::wrap(const String &) { | ||||
| Ref<JavaClass> JavaClassWrapper::_wrap(const String &, bool) { | ||||
| 	return Ref<JavaClass>(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fredia Huya-Kouadio
						Fredia Huya-Kouadio