Why is Unity Adding Extra Frames to Animation?

Unity 3.5.0f1

It makes looping impossible because there is a huge pause at the end of the animation! How can I fix this?

[646-Screen+Shot+2012-04-16+at+1.41.29+PM.png|646]

Oh and I should say, YES I tried quitting Unity and starting it back up again.Running on Mac OS X 10.7.3

[648-Screen+Shot+2012-04-16+at+3.41.40+PM.jpg|648]

Because your animation is that long. There might be another curve that has a keyframe at 20:00

All curves have to cover the whole animation length. You can’t animate a value just in a sub area of your animation. If a property has an animation curve, it is animated by this curve as long as the animation is playing.

edit

If you’re animation is created in Unity, just check all curves. Select at the bottom right “Show: Animated”. Now only objects that are animated are shown in the animation-hierarchy-view. Check all objects, there have to be at least one curve that has a keyframe at 20:00.

If it’s an animation created outside Unity I’m not sure what you can do about that. Well you can duplicate the animation so you can edit it inside Unity, but for imported animations that’s not recommended since the changes have to be done again when you change the animation outside of Unity.

answered here: How to set the duration of a looping animation from the inspector? - Questions & Answers - Unity Discussions

(in short, use the script found here: http://forum.unity3d.com/threads/131340-Reduce-animationclip-length/page2#post967674)

I have found in version 3 that animation lengths are different in mac and pc. If you have made an animation in maya at 24 fps on pc and import to unity it will change length in 5:4 ratio (24 fps to 30 fps) however if you transfer it to mac it will work properly.

So if you have made an animation of 1-100 in maya when you bring it into unity on pc you would need to change the frames to 1-125 in order to work on it properly howerver if you then move it again to mac you would need to reset all the frame times again to original position
dunno if this problem is related to yours but maybe.

The only solution I’ve found is to delete the animation, make a new one, and then be careful never to create any frames longer than the maximum length the animation is estimated to need.