Home / Godot / G10

Godot error: SpriteFrames already has animation '%s'. — cause and fix

Godot 4.x runtime/editor script: add_animation is called repeatedly on the same SpriteFram

ID
G10
Engine
Godot
Verification
源码原文(路径)
Frequency
未公开

Original message (verbatim)

SpriteFrames already has animation '%s'.

Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.

Trigger

Godot 4.x runtime/editor script: add_animation is called repeatedly on the same SpriteFrames with an animation name that already exists.

Typical cause

add_animation dedupes with animations.has(p_anim); if it exists, ERR_FAIL_COND_MSG aborts and does not overwrite the existing animation.

Step-by-step fix

  1. Check has_animation before creating.
  2. Or remove_animation first, then add.
  3. Review script logic that re-initializes the same SpriteFrames.

Source links

Per-entry sources and capture date are listed at /sources#G10.

Related errors

Related Godot errors

Need an offline quick-reference checklist?

Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.

View Pro pack / order

Back to the all-errors index Checkout and buy the Pro pack — $19.00