Understanding Animation Events
It's always good to know how animation events work inside unity
Last updated
It's always good to know how animation events work inside unity
Last updated
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.