Skip to content

Troubleshooting animation

Almost every problem is one of three things: the animator never started, something's pointing at the wrong file, or a name doesn't match.

Nothing moves

Work down the list:

  1. Are you in Play mode, and is Preview In Editor off? Animation runs during Play, or in Edit mode only while Preview In Editor is on.
  2. Is Play On Start on? With it off, the animator starts paused — it needs a script calling Resume(), or the checkbox turned on, to actually play.
  3. Does the entity have the Animator component? Look for an Animator section in the Inspector; if it's missing, Add Component → Animator.
  4. Is a controller assigned? The slot reads (none) when it's empty.
  5. Does DefaultState match a state name? Exactly, including capitals.
  6. Is Speed zero? That freezes playback — on the component, or on the state itself.

The sprite shows the whole image

The flipbook isn't reaching the sprite:

  • The entity's Sprite Renderer needs the sprite sheet image on it. A clip narrows down whatever texture is already there — it doesn't assign one.
  • The clip should be pointing at the sprite sheet file, not the image file directly.
  • The clip's first frame should start right at the beginning — nothing shows before it.

While playing, watch the Sprite Renderer's UV Rect in the Inspector. Numbers changing means frames are landing; stuck at 0,0,1,1 means they aren't.

The sprite shows the wrong part of the image

The sliced frames don't line up with the image. Re-open the Sprite Sheet editor and check the cell size against your image's actual grid — a mismatched Cell Width/Height slices the wrong rectangles.

Showing a region of a completely different picture means the entity's texture and the sheet's image are two different files.

The movement works but the frames don't (or the other way round)

  • Check the property name against the list of animatable properties. A plausible-looking one that isn't on the list won't work.
  • If the track targets a child entity, check the name matches that child's name in the Scene Hierarchy exactly.
  • Open the Log panel. Unknown properties, missing frame names, and unresolvable child paths are reported there once, just after you press Play.

A file I just made doesn't work

A file created outside the editor a moment ago isn't recognized yet. Close and reopen the project so the editor picks it up.

It plays once and stops

This clip isn't set to loop, so it holds its final pose instead of repeating. Turn looping on for it to repeat.

The entity jumps somewhere else when I press Play

Keyframe values are absolute positions, not offsets, so the clip overrides what you set in the Inspector. Bake the position you want into the keyframe values.

A transition never fires

  • Check that your script is actually calling SetFloat/SetBool/SetInt/SetTrigger with the exact parameter name declared on the controller.
  • A transition set to wait for its clip to finish first won't be taken until that happens — if that moment never actually arrives (a looping clip you expected to exit once, say), it won't fire.
  • The first transition in the list whose conditions all pass wins. A broader one placed earlier can shadow a more specific one below it — check ordering in the Animator editor.
  • If the parameter is set from a physics check (a Grounded bool from a raycast, say), log the raw result of the Physics2D call itself before assuming the Animator side is at fault — a ground check that never actually hits anything looks identical to a transition condition that's wrong.

A trigger doesn't fire its transition

Triggers auto-consume: SetTrigger("Attack") only satisfies a condition on the next time the animator evaluates transitions, and clears itself immediately after — call it once per attack, not continuously every frame from OnUpdate.

Toggling Preview In Editor moved my entity and didn't put it back

This should self-correct: turning Preview In Editor off restores the entity's Transform and Sprite Renderer to what they were before preview turned on. If it doesn't look restored, check whether the entity was also being animated by a different animator or script at the same time — the snapshot only covers what this one Animator component touched.

Double-clicking an asset opens the wrong thing, or nothing

  • .jsprite → Sprite Sheet editor, .janim → Timeline panel, .janimator → Animator editor. If nothing opens, confirm the file's extension is exactly one of those three (a renamed or copied file with a typo'd extension won't match).

See also

  • Physics2D — the query methods (Raycast, OverlapCircle, and the rest) commonly used to drive a transition condition, referenced above.
  • Session — if an entity animates differently depending on something decided in an earlier scene, check that the value actually made it across the Scenes.Load before assuming the Animator itself is misconfigured.