atteneder / glTFast

Efficient glTF 3D import / export package for Unity
Other
1.24k stars 250 forks source link

Animation clip load error at runtime when set animation method to Mecanim #717

Open uncle-jerry opened 3 weeks ago

uncle-jerry commented 3 weeks ago

Describe the bug Animation clip load error at runtime when set animation method to Mecanim.

09-11 17:45:19.093 13676 13695 E Unity : Can't use AnimationClip::SetCurve at Runtime on non Legacy AnimationClips 09-11 17:45:19.093 13676 13695 E Unity : GLTFast.AnimationUtils:AddVec3Curves(AnimationClip, String, String, NativeArray1, NativeArray1, InterpolationType) 09-11 17:45:19.093 13676 13695 E Unity : GLTFast.AnimationUtils:AddTranslationCurves(AnimationClip, String, NativeArray1, NativeArray1, InterpolationType)

09-11 17:45:19.108 13676 13695 E Unity : Can't use AnimationClip::SetCurve at Runtime on non Legacy AnimationClips 09-11 17:45:19.108 13676 13695 E Unity : GLTFast.AnimationUtils:AddRotationCurves(AnimationClip, String, NativeArray1, NativeArray1, InterpolationType)

To Reproduce Steps to reproduce the behavior: 1) Set animation method to Mecanim; 2) Build project as an android apk, load gltf file at runtime;

Expected behavior Animation clips loaded correctly.

Desktop (please complete the following information):

additionally (if significant for the bug):

Additional context Add any other context about the problem here.

atteneder commented 1 day ago

Hi @uncle-jerry,

Mecanim support is intended for in-Editor use only. The error you get is a Unity limitation, not a glTFast bug.

Out of curiosity, if not with the legacy animation system, how do you intend to put those animation clips to use at runtime?