I have a character being controlled with the mecanin system and i have a script that plays the animation to throw a fireball then instantiates a fireball and shoot it.The problem is it instantiates and shoots the fireball mid animation what i want to know is how to call a function at a specific frame of animation with the mecanin system.Thank you
Mecanim now supports Events. Select the Object with the animations in the Inspector, go to the Animation tab at the top. If the animation is set to Generic or Humanoid there will be an Event foldout at the bottom. There you can add events to specific frames and specify what function on the object that plays the animation should be called. You can even add some variables. This is not yet documented properly in the manual.
Use Yield WaitForSeconds(Time);
or if you are using Unity Pro you can use Mecanim Animation Curves