- Home /
Play sound on anim frame
Is it possible to play a sound when animation reaches a specific frame? I have a reload anim and at frame 10 I need to play a noise, but I don't know how. It's really important that it's played at frame 10 and not after X seconds. Thanks
Comment
Answer by Bunny83 · Mar 15, 2011 at 05:52 PM
Animations in Unity are timebased and don't have much relation to the underlying keyframes. I would suggest to use AnimationEvents to fire a specific function when reaching a specific point during playback.
You can also add events via scripting. Take a look at AnimationClip.AddEvent.