Unity Animation Not Playing? Fixing the Animator Step by Step

Illustration of an animation state machine graph with a running character

Written by

in

Your character has an Animator, the clips look fine in the preview, and in Play mode it just… stands there. Or the jump animation plays half a second late. Or the attack plays once and never again. The Unity Animator is powerful, but it fails quietly: no errors, just the wrong pose. This guide goes through the causes one at a time, in the order worth checking them: setup, parameters, transitions, Exit Time, layers, root motion and rigs, with the exact settings to change for each.

First: Watch the Animator Live

Before changing anything, open Window > Animation > Animator, enter Play mode, and select the character in the Hierarchy. The Animator window now shows the live state machine: the active state has a blue progress bar, transitions light up as they happen, and the Parameters panel shows current values.

This one step answers most questions immediately:

  • Is the state machine in the state you expect? If not, the problem is transitions or parameters.
  • Is it in the right state, but the model doesn’t move? The problem is the clip, the rig or the avatar.
  • Does the parameter change when you press the key? If not, the problem is your code.

If the window shows the controller but nothing animates live, make sure you selected the object that actually has the Animator component, not its parent.

Setup Problems

No controller assigned

The Animator component’s Controller field must reference your Animator Controller asset. An Animator with no controller does nothing and logs nothing.

The Animator is on the wrong object

Animation clips store paths to the bones and child objects they move, relative to the object with the Animator. If you move the Animator component to a parent or child, or rename a child the clip animates, those paths break. In the Animation window, broken properties show in yellow with (Missing!). Put the Animator back on the object the clips were made for, or fix the paths.

The Animator is disabled or culled

Check the component is enabled. Also check Culling Mode: with Cull Completely, the Animator stops when no camera sees the renderer. That’s great for performance, but a character whose renderer is on a child object or off screen may never animate. Use Always Animate to test.

The clip is legacy

If a clip was imported or created as Legacy, the Animator can’t play it. Select the clip, switch the Inspector to Debug mode (the ⋮ menu) and untick Legacy, or change the model’s import settings under Rig from Legacy to Generic or Humanoid.

Parameters and Code

Parameter names are plain strings, so a typo fails silently. animator.SetBool("isRunning", true) does nothing if the parameter is called IsRunning. Unity logs a warning (“Parameter ‘isRunning’ does not exist”), but it’s easy to miss.

Use cached hashes to avoid typos and repeated string lookups:

using UnityEngine;

public class PlayerAnimation : MonoBehaviour
{
    static readonly int SpeedHash    = Animator.StringToHash("Speed");
    static readonly int GroundedHash = Animator.StringToHash("Grounded");
    static readonly int JumpHash     = Animator.StringToHash("Jump");

    [SerializeField] Animator animator;
    [SerializeField] CharacterController controller;

    void Update()
    {
        Vector3 v = controller.velocity;
        v.y = 0;
        animator.SetFloat(SpeedHash, v.magnitude, 0.1f, Time.deltaTime); // damped
        animator.SetBool(GroundedHash, controller.isGrounded);
    }

    public void Jump() => animator.SetTrigger(JumpHash);
}

Check that the parameter’s type matches: calling SetBool on a Float parameter does nothing. Also make sure you’re setting parameters on the right Animator. GetComponent<Animator>() on the root returns nothing if the Animator sits on the model child. Use a serialized field or GetComponentInChildren<Animator>().

Transitions That Never Fire

Click the transition arrow and look at the Inspector.

  • Conditions: every condition must be true at the same time. “Speed Greater 0.1” and “Grounded true” means it won’t run in the air. Make sure a float condition uses the right comparison. Floats rarely equal exact values, so use Greater/Less, never check for exactly 0.
  • Has Exit Time: when ticked, the transition can’t happen until the current clip reaches the Exit Time, even if the conditions are true. For a transition with no conditions, Exit Time is the only thing that triggers it. See the next section.
  • Is it connected to the state you think? Transitions from Any State can interrupt everything, and a transition from Any State into a state with a true condition keeps restarting that state every frame. Untick Can Transition To Self on those.

Animations That Start Late

The classic complaint: “I press jump and the animation starts a second later.” Almost always it’s Has Exit Time on the transition out of Idle or Run. The transition waits until the current clip loops to its Exit Time, and only then starts.

For anything that should respond to input immediately (jump, attack, hit reaction), on the transition:

  1. Untick Has Exit Time.
  2. Set Transition Duration low, around 0.05–0.15 seconds. Long blends feel sluggish.
  3. Consider the Interruption Source setting, so a new action can cut a blend that’s still in progress.

Keep Has Exit Time on for transitions that should wait for an animation to finish, like attack back to idle. For those, set Exit Time to around 0.9 so the blend starts just before the end.

⌨️ Faster in the Animator and everywhere else

Debugging animation means lots of hopping between the Scene, Animator and Animation windows. Our free cheat sheet lists the Unity Editor shortcuts that make that quicker.

Open the Unity Keyboard Shortcuts Cheat Sheet →

Triggers That Fire Twice or Get Stuck

A Trigger parameter stays set until a transition consumes it. That causes two common bugs:

  • The attack plays twice. The player pressed attack during the attack, the trigger stayed set, and the moment the state machine could use it again, it did. Call animator.ResetTrigger(AttackHash) when the attack starts, or only set the trigger when you’re in a state that accepts it.
  • The trigger is set but nothing happens. No transition from the current state uses it, so it sits there. Later, when you reach a state that does use it, the old action suddenly plays. Watch the Parameters panel: a trigger’s checkbox stays ticked until it’s consumed.

For actions that must not queue up, a Bool you set and clear yourself is often more predictable than a Trigger.

Layers and Avatar Masks

With more than one layer (say, legs running on the Base Layer and an upper-body attack on a second layer):

  • Weight: a new layer’s weight defaults to 0 for layers added after the first, so it does nothing until you raise it in the Layers panel or with animator.SetLayerWeight(1, 1f).
  • Avatar Mask: without a mask, an upper-body layer overrides the whole body, including legs. Create an Avatar Mask (Humanoid body map or a Transform list for Generic rigs) that only enables the upper body, and assign it to the layer.
  • Blending: Override replaces lower layers for the masked parts, Additive adds on top. Additive needs clips authored as offsets, or the result looks wildly exaggerated.
  • An empty default state on the upper layer lets the base layer show through when nothing is happening on top.

Rig, Avatar and Root Motion Problems

Humanoid animation doesn’t play on my model

Both the model and the animation’s source file need the Humanoid rig type, and the model’s avatar must be configured (a green body map in Configure Avatar). A Generic clip only plays on the exact rig it was made for. A Humanoid clip can be retargeted to any Humanoid.

The character plays the animation but snaps back to the start

The clip contains movement (root motion), but Apply Root Motion is off, so the body moves and then resets. Either turn on Apply Root Motion to let the animation move the character, or keep it off and move the character from code, using an in-place version of the clip.

The character slowly drifts or sinks

Root motion is on and the clip has small unwanted motion. In the clip’s import settings, under Root Transform Position (Y) and Rotation, tick Bake Into Pose for the axes that shouldn’t move the character.

The character floats or is stuck in T-pose

T-pose means the Animator isn’t driving the model: wrong avatar, no controller, or the clip’s rig doesn’t match. Floating often means the Based Upon setting for Root Transform Position (Y) should be Feet for Humanoid clips.

Quick Symptom Lookup

Symptom Most likely cause
Nothing animates, no errors No controller, disabled Animator, or culling
Stuck in the first state Parameter typo or wrong type; conditions never true
Action starts late Has Exit Time on the transition
Action plays twice Trigger not reset
Animation restarts every frame Any State transition with Can Transition To Self
Upper-body layer does nothing Layer weight 0
Whole body follows the upper layer No Avatar Mask
T-pose Avatar/rig mismatch
Snaps back after moving Clip has root motion, Apply Root Motion off
Some bones don’t move Broken paths (renamed/moved objects)

FAQ

Why is my Unity animation not playing?

Check the Animator has a controller, is enabled and on the right object, then watch the Animator window in Play mode to see whether it enters the expected state. Parameter typos and Exit Time are the next most common causes.

What does Has Exit Time do?

It makes a transition wait until the current clip reaches the Exit Time before it can happen. Turn it off for transitions that should respond to input immediately.

How do I play an animation from code?

Set parameters that drive transitions (SetBool, SetFloat, SetTrigger), or jump straight to a state with animator.Play(“StateName”) or CrossFade for a blend.

Why does my trigger fire twice?

Triggers stay set until a transition consumes them. Call ResetTrigger when the action starts, or use a Bool you control.

Should I use Apply Root Motion?

Use it when the animation should drive movement, like a realistic walk or a roll. Turn it off when movement comes from code or physics, and use in-place clips.

Why is my character in T-pose?

The Animator isn’t driving the model: no controller, or a rig or avatar that doesn’t match the clips. Use Humanoid rigs for both, or a Generic clip made for that exact rig.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *