atteneder / glTFast

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

Animation cannot loop when using GltfImport with 'mecanim' settings #662

Open edwinhan1983 opened 10 months ago

edwinhan1983 commented 10 months ago

I tried to download a glb with animations using GltfImport with 'mecanim' settings by code in runtime, then would use AnimatorOverrideController to change old animation clip to this new animation clip. (I can not use 'legacy' settings because legacy animation clip is not working with AnimatorOverrideController in unity).

Everything works fine except the animation can not loop even with 'WrapMode.Loop' configured.

I did find a similar record here: https://github.com/atteneder/glTFast/issues/291, but the manually editing method is not very suitable for my case, is there any new changes that we can change the animation clip to loop through runtime code?

thanks.

atteneder commented 2 months ago

Thanks for reporting.

Fist, Mecanim is not tested at runtime, only the legacy animation system is.

Could you please provide a small code sample (or entire project) so I can reproduce it easily?