Answered

Work around for "Needs to be at least 2 frames long."?

Sean W 10 months ago updated by Peter - Soxware Developer 10 months ago 1

I've imported some of my old Unity animations into a UMotion project, and now I am trying to export them back to Unity animations so I can use them in game. However, a majority of my animations are only 1 frame long because they are just static poses which is what I'm using for the game. Unfortunately, when I try to export them, they get skipped, with the error "Clip [clip name] skipped. Needs to be at least 2 frames long."

Is there a way to disable this behavior since my clips are intentionally 1 frame long?

UMotion Version:
1.20p04
Unity Version:
2019.1.0f2

Answer

Answer
Answered

Hi Sean,

thank you very much for your support request.

This restriction was implemented because there are some edge cases where a one key frame animation doesn't work as intended. I recommend that you select the master key frame (click on the top-most key to select all keys on that frame) then use CTRL+C, move the frame cursor one frame forward and then press CTRL+V. Thus creating a two frame long animation with no motion.

If I'm not mistaken, this shouldn't increase the build file size of the *.anim as curves with only two key frames are optimized into a "constant" curve by Unity. You can see the build file size in the Inspector of your *.anim. Please note that the size the *.anim has on your disk (shown in Explorer/Finder) is NOT the size it consumes in your built game.

Please let me know in case you have any follow-up questions.

Best regards,
Peter

GOOD, I'M SATISFIED
Satisfaction mark by Sean W 10 months ago
Answer
Answered

Hi Sean,

thank you very much for your support request.

This restriction was implemented because there are some edge cases where a one key frame animation doesn't work as intended. I recommend that you select the master key frame (click on the top-most key to select all keys on that frame) then use CTRL+C, move the frame cursor one frame forward and then press CTRL+V. Thus creating a two frame long animation with no motion.

If I'm not mistaken, this shouldn't increase the build file size of the *.anim as curves with only two key frames are optimized into a "constant" curve by Unity. You can see the build file size in the Inspector of your *.anim. Please note that the size the *.anim has on your disk (shown in Explorer/Finder) is NOT the size it consumes in your built game.

Please let me know in case you have any follow-up questions.

Best regards,
Peter