I’m trying to make 2d animation that contains 3 frames, whenever i create animation and add these 3 frames, unity automatically adds an extra empty frame which spoiled my animation. i did some research and find out it’s not only me with this problem but i didn’t find any solution. i mean, this was simple operation i just drag 3 frames from a spritesheet to the void to create this animation. help!
Hello, actually this is not an extra frame, each sprite of your animation occupies a full frame so for the last sprite to render, unity needs to have the animation running for one frame longer
If you look closely, even though it shows 4 steps, your animation actually lasts for 3 frames
Here is a drawing of a 7 frame animation (sprites 0 to 6) that lasts for 8 steps :
In blue you have the duration for which the sprite is visible and in red you can see the “extra” frame/step is needed to show the last sprite
this “extra” frame is usefull if you want to see the last sprite, you need one more step than you have sprites
Hi @Zodiaq , I am fairly new to unity, have this issue also, not sure if it is causing or influencing my key current problem with this animation, can’t keep state at end, and my rotation for my 2D character in animation works in the clip in editor, but doesn’t happen in the game.
The extra frame seems to happen, yes, as soon as you drag sprite onto the clip, where it adds a redundant frame at the end. Or if I select sprite from within add Property in the animation clip, same problem.
Note if I remove the sprite from the final keyframe of the animation clip, this will stop the whole clip overrunning by 1 frame. So maybe this is what we’re supposed to do? This is deliberate perhaps for some reason?
I’m beginner, so anyone who can advise why this is designed like this, thanks kindly!
So it seems to be ‘padding’ any sprite property added to keyframe within clip by 1 frame extra, so if you are more than 1 frame from your final keyframe, it won’t extend the clip. Does this mean we’re not supposed to put any sprite property on final key frame?
Same problem here, what is happening Unity ? I’m using animations for a long time now and I never encountered this issue before. Recreating the animation doesn’t fix the issue.
Did anyone managed to fix this ?
Unity 2018.3.8f1