Working with Animation Events in Unity

Niraj Karki
Jul 26, 2021

2.5D Game Development

In a game your player need to deal with certain number of animations and it is very hard and messy to control all of them directly through code so we use animation events to control all the animation behavior and play animation by changing the parameter values so defined.

Here we have four parameters, three bool and one float to control all the animation states.

First we make transitions to other animation by right clicking and selecting the make transition and drag to other animation states.

Then select the transition arrow and on the inspector click on the + symbol under the conditions and set the desired conditions using the parameters to control the animation flow.

To control the transitions from one animation to another, you can go to the settings and set your desired values.

--

--