Main

Call Code From Animation Events | Unity Tip #1

Did you know you can call code from animation events in Unity? Useful in many situations, such as playing audio for footsteps, or like in this video's example, spawning leaves when a tree is hit. - My Socials - Website https://www.tomstephensondeveloper.co... Twitter https://twitter.com/DeveloperTom1 Game Jam Games & Projects https://tomstephensondeveloper.itch.io/ #Shorts

Tom Stephenson

2 years ago

did you know you can call code from animation events in unity make sure your script is on the same game object as your animator set the method you want to call public so the event can access it click add event in the animation window select the events of the animation timeline then in the inspector select the method you want to call from the drop down list your animation should now call your code at your chosen frame [Music] [Applause]

Comments

@swiftcreations

Thanks a ton!