Weird frame numbers in imported animations

I’m currently importing a simple 2 bones animation from Blender into Unity and I found a weird behaviour occourring.

As can be seen in the images in Blender I’m using a frame rate of 30 fps with a 60 frames (1 to 60) animation giving a length of 2 seconds.
In Unity the same clip is imported with frames going from 0 to 59 (why is that?) still with 30 fps but a lenght of 1.967, this doesn’t add up.

Am I missing something in the import settings or is this behaviour intended?

Is the last animated keyframe of the bones in the blender file on frame 59? In Max the fbx export can default to the last frame where the last animated keyframe sits on the timeline.

To fix the artist can duplicate the keyframes on frame 59 and place them on frame 60.

A friend of mine suggested that Unity might need to interpolate between the keyframes in order to create the animation frame (does it sound crazy?), so to make a 60 frame animation (meaning that if played at 30 fps it lasts 2 seconds) a 61st keyframe is needed in Blender.

That worked and I have now a 0 to 60 frame in Unity lasting 2 seconds at 30 fps.
A official statement would be usefull anyway.

Hi @AndreaBrag, everything is ok, that may look weird but your first keyframe in blender is on frame 1, and last on frame 60 which mean your animation is 59 frames length. That’s no matter which frame you set up in blender’s timeline on start and end. Unity always takes from first to last keyframe:


You may see an issue because first part of your animation is 14 frames length, rest are 15, but that depends what kind your animation is, maybe you want it.