Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Animation last keyframe does not add extra frame anymore

Discussion in 'Animation' started by huulong, Aug 21, 2022.

  1. huulong


    Jul 1, 2013
    After upgrading to Unity 2022.1 I noticed that my animations, which used to show the frame after the last keyframe in light gray to indicate that the animation ended 1 frame later, were now displayed with the timeline highlight stopping right at the last keyframe.

    There are many discussions about the previous behavior of having an extra frame at the end, which required you to pay attention and put the last keyframe one frame earlier. And if you had an interpolated curve that needed looping, you had to first place the keyframe on frame N with the same value as the first frame for perfect looping anyway to generate the curve, then add a keypoint on frame N-1 to interpolate the pre-last value, then remove the keypoint at N (and hope that the portion looping between N-1 and the first frame is interpolated correctly).

    Said discussions' links:

    Now, it seems that it stops right at the last frame, which makes things easier. My fear is that this update was done silently though, with no notification that the animations may slightly change, nor a checkbox to preserve the old behavior. The changelog doesn't mention it either:

    Is it a simple cosmetic change, or have all animations really one frame fewer than before?
    Should we all update our existing animations?

    I'm trying to see with my own eyes if the extra frame has been cut or not. I have the impression that it's the case, but my perception is now 100% reliable either.

    EDIT: I don't have time right now, but if somebody can take a 60FPS capture of the same looping animation taken in Unity 2021 and 2022, maybe it would give us a clue.

    EDIT: I found a trick to see time more slowly: set Samples to 1 and you will clearly see that the animation loops right on the last keyframe!
    Last edited: Aug 21, 2022