smix8/GodotAnimationRetargeting

Add Android Support

Closed this issue · 5 comments

Thank You for sharing such a nice and awaited feature

Description of the issue :
Currently it seems that it doesn't support Android
It doesn't let change "Animation Export Directory" of the "Animation Retargeting" Node from res:// which is not accessable when exported to Mobile Platform

smix8 commented

I have to admit I have zero Android experience. I don't use it at all and have not a single android device to test so I never considered Android support.

That said, this doesn't mean that I wouldn't support it, if other people test it and tell me what is required to make it work for them.

Animation Export Directory is currently hardcoded to be a "res://" path but this can be changed. Is there any use case with exporting animations at runtime on Android? Last time I tested animations stored outside of the "res://" system they wouldn't work correctly on the exported game (the reason why "res://" path was hardcoded).

smix8 commented

Removed the hardcoded Animation Export Directory restrictions.
godot_3.x commit ef9a376
godot_4.x commit b9b10c5
godot_3.x_gdscript commit 8378848

Getting few errors on Android

04-27 04:04:17.617  5899  6002 E godot   : **ERROR**: Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.617  5899  6002 E godot   :    At: platform/android/file_access_android.cpp:128:get_buffer() - Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.872  5899  6002 E godot   : **ERROR**: Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.872  5899  6002 E godot   :    At: platform/android/file_access_android.cpp:128:get_buffer() - Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.876  5899  6002 E godot   : **ERROR**: Cannot get class 'AnimationRetargeting'.
04-27 04:04:17.876  5899  6002 E godot   :    At: core/class_db.cpp:1342:is_class_enabled() - Condition "!ti" is true. Returned: false
04-27 04:04:17.876  5899  6002 E godot   : **WARNING**: Node AnimationRetargeting of type AnimationRetargeting cannot be created. A placeholder will be created instead.
04-27 04:04:17.876  5899  6002 E godot   :    At: scene/resources/packed_scene.cpp:168:instance() - Node AnimationRetargeting of type AnimationRetargeting cannot be created. A placeholder will be created instead.
04-27 04:04:22.803  2059 10263 I PackageManager.DexOptimizer: Running dexopt (dexoptNeeded=1) on: /data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/base.apk pkg=org.godotengine.test isa=arm64 dexoptFlags=boot_complete,debuggable,public,enable_hidden_api_checks targetFilter=quicken oatDir=/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/oat classLoaderContext=PCL[]
04-27 04:04:22.804  1280  2240 V installd: DexInv: --- BEGIN '/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/base.apk' ---
04-27 04:04:22.863  6206  6206 I dex2oat : /apex/com.android.runtime/bin/dex2oat --input-vdex-fd=-1 --output-vdex-fd=11 --call-from-installd=1 --resolve-startup-const-strings=true --max-image-block-size=524288 --compiler-filter=quicken -j6 --debuggable --classpath-dir=/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA== --class-loader-context=PCL[] --generate-mini-debug-info --compilation-reason=unknown
04-27 04:04:24.060  1280  2240 V installd: DexInv: --- END '/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/base.apk' (success) ---
04-27 04:04:24.061  2059 10263 I PackageManagerServiceInjector: FirstUseActivity Pinning optimized code org.godotengine.test

Screenshot_20210427_041130

smix8 commented

Android seems to require different build parameters. So far I couldn't find something valuable for this error or how to fix it. Maybe if someone from the Android crowd moves by and knows what to do that would be great.

smix8 commented

Added to the feature tracker.