[Notice of Holidays]
Please note that our staff will not be available from 2024/Dec/28 - 2025/Jan/5 JST.
The Live2D Creators Forum will remain open during the holidays.
Submissions that require a response will be answered after we reopen for business.
Please note that it will take longer than usual to respond to your request.
Loading animations in runtime from an "StreamingAssets" folder
Grettings, My friend and I are trying to make possible to customize by giving the choice to the players to use their Live2D models but we're having problems that we don't know how to make the animation load in runtime using the "motion3.json" files, can someone help us? Thanks in advanced
0 ·
Comments
Thank you for your contact.
This is Live2D Support.
https://docs.live2d.com/cubism-sdk-tutorials/initializemodel/?locale=en_us
To generate an AnimationClip from .motion3.json at runtime, load .motion3.json with CubismMotion3Json.LoadFrom() in the same way as we loaded the model on the above page, and then call CubismMotion3Json.ToAnimationClip().
However, Unity does not allow runtime-generated AnimationClips to be used with the Mecanim or Playable APIs.
If you want to use a runtime-generated AnimationClip, you need to play it using Unity's Animation component.
Thank you.
Thank you for the comment! I tried to play "CubismMotion3Json.ToAnimationClip()" by using Unity's Animation component (By replacing an empty animationClip using AnimatorOverrideController). However, it looks like only worked in Editor mode. Is there any way I can play runtime-generated AnimationClip after the build? Thank you!
Best regards,
Zack