Skip to content

Animator

Ilia Petrov-Komotskii edited this page Sep 29, 2026 · 9 revisions

Namespace Mane.Unity.Animator. State machine behaviours use ManeStyle inspectors.

AnimatorRandomizer

On state enter, the first matching SwitchCondition sets an int selector to Random.Range(0, TotalVariants). Leave the condition parameter empty for “always”.

Typical use: a blend-tree or sub-state machine keyed by that int.

AnimatorParameterResetter

On state enter, resets a bool / int / float parameter to false / 0 / 0. Typical use: clear IsAttacking when idle starts. The reset value is not configurable.

Animation events

Put AnimationEventInvoker on the same object as the Animator. In the clip, add an event named InvokeEvent. Subscribe in code:

using Mane.Unity.Animator;

GetComponent<AnimationEventInvoker>().AnimationEventInvoked += PlayFootstep;

AnimationEventParticleSystemInvoker does the same with event name InvokeParticleSystem and plays an assigned ParticleSystem.

Screenshot: animator-randomizer.png — state inspector with conditions and variant count. Host at https://raw.githubusercontent.com/wiki/ManeFunction/ManeTools-Unity/animator-randomizer.png.

Clone this wiki locally