A downloadable tool

Download NowName your own price

This asset provides the ability to call UnityEvents stored in a script added next to an Animator from its AnimatorController's states.

This can be useful for things from easily adding events like footsteps to controlling how a character works by using the Animator like a state machine, blocking and unblocking the character's input, enabling and disabling rootmotion at certain points and much more.

This asset was later rewritten as a version 2 available here

How to use

First, add the component AnimatorEvent to the GameObject that has the Animator that has the AnimatorController in question, and add events to it.

Then, navigate through the AnimatorController and add the script AnimatorEventSMB to the states that will call the previously defined events.

Extra info

The events can (only) be triggered by 5 type of triggers:

  • Entering a state, just when the transition to it starts
  • Entering a state, just when the transition to it ends
  • Exiting a state, just when the transition from it starts
  • Exiting a state, just when the transition from it ends
  • At a specific point in time when playing a state. It can be repeated every time the state loops. It can also fire the trigger in case the animator leaves the state before the specific point in time.

For the last type of trigger, a slider is provided to help pinpoint the exact time for the trigger to happen by previsualizing the animation. This feature doesn't work with blendtrees, only showing the preview for the first animation without blending it with the others.

You can change the name of an event at any point because it is referenced by an integer ID, not by its name. You can also type the character '/' in the event name to organize the events in a hierarchy like folders, by adding as many / as needed.

Works with Unity 2018 and 2019. It should also work with 2017.

Download

Download NowName your own price

Click download now to get access to the following files:

Unity Animator Events v1.unitypackage 14 kB

Leave a comment

Log in with itch.io to leave a comment.