Quick Animation Events
  • Introduction
  • Understanding Animation Events
  • The Interface
  • Creating a Event Profile
  • Adding Events to Animations
  • Recommendations
  • Editing Existing Events
  • Support
Powered by GitBook
On this page

Understanding Animation Events

It's always good to know how animation events work inside unity

PreviousIntroductionNextThe Interface

Last updated 2 months ago

Check the official animation event Documentation:

Use an Animation Event to trigger a function at a specific moment in an animation. This function can be in any script attached to the GameObject, but it must accept only a single parameter of one of the following types: float, int, string, an object reference, or an AnimationEvent object. Make sure the GameObject has both an Animator component and the script containing the event functions.

If you need to pass multiple parameters, you can use an AnimationEvent object. This object allows you to include a float, an int, a string, and an object reference as member values. Additionally, it provides information about the Animation Event that triggered the function.

https://docs.unity3d.com/Manual/script-AnimationWindowEvent.html
Image from unity Docs showing the animation events