Animation event fires three times on the first frame - is this a known issue?

Howdy, I have an animation with an event on the second frame and one on the last frame. The function that the events trigger takes an AnimationEvent as a parameter and prints the time that the event is triggered.

Triggering the animation gives this result:


which is exactly what I would expect.

What I really want is to have the first event to be on the first frame, but when I move that event onto the first frame (so there is just one event on the first frame and one on the last) I get this result:


As you can see, the function is triggered 4 times. Twice at the beginning, once at the end, and once at the beginning again. I’m not doing anything different other than moving the event between the second and first frames and the animation plays normally both times.

Has anyone had the same problem?

The function just looks like this:

function PrintTime(animEvent : AnimationEvent)

Thanks very much,


edit: I’m using Unity 4.5 and haven’t tried using animation events before this.

If your animation is on the default state of your animator it will play when it wakes up. Set your default state to one without an anim on it. The default state is the orange one.