AnimationEvent and Clip, Computing a specific frame

Hey guys,

I was wondering if anyone knows of a way to compute a specific frame to perform an event.

Currently the AnimationEvent takes a time as a parameter which I am assuming is based on the overall time of the clip.

I think it would be more intuitive to use a frame number to perform the event rather than time but I cannot figure out a way to do this.

Does anyone know how?

Cheers
Ashley.

BUMP

Anyone?

There’s no function to get the frame offset directly in Unity. However, if the animation was originally designed around a particular framerate, you can just divide the time by the frame time to get the frame number.