The animation state could not be played because it couldn’t be found!

This guide explains what to do when unity refuses to play animations and gives the error “The animation state could not be played because it couldn’t be found!“. There’s a few different causes of this error and cause for the animations not to play is listed below.

The animation state AnimationClipName could not be played because it couldn’t be found! Please attach an animation clip with the name ‘AnimationClipName‘ or call this function only for existing animations.

Why the animation state isn’t being found

  • You haven’t added the animation clip into the animations list of the animation component.
    In order for the animation clip to be referenced via script you first need to make sure the animation clip is actually in the animations list of your animation component.
  • Make sure the spelling of the animation clip in your script exactly matches the clip name.
    Capitalization, spaces and symbols of the animation clip name should match the clip exactly.

    AnimationClip.Play(“AnimationClipName”);

  • Animations must be marked as legacy to be used with the animation component.
    1. In the project window select the animation clips you’re trying to play.
    2. Set the inspector to debug mode which exposes hidden variables, in this case it’ll make the “Legacy” checkbox appear.
    Unity Inspector Debug Mode

    3. Tick the “Legacy” checkbox and change the inspector back to normal mode.
    Unity Inspector Animation Clip Legacy Checkbox

If unity animations still aren’t playing but the ‘The animation state could not be played because it couldn’t be found!’ error is still being logged to the console as an error.

Make sure the points above have been read and understood and let us know in the comments if there’s more causes which need to be listed.

Otherwise if you’re having other issues with unity animations not playing, leave a comment below and we can reply directly!

6 Comments on “The animation state could not be played because it couldn’t be found!”

  1. hi 🙂 i’m having the same issue but i’m using unity 5 which don’t have legacy anymore if i’m correct, and all the points above are ok, so what can i do ? 🙁 thank you in all cases, bye 🙂

    1. This guide was written for a relatively new version of Unity 5 and is still valid for Unity 2017 and Unity 2018 so the guide should still work fine.

      Like the guide says check your scripts and ensure the spelling of your animations and the capitalization matches your animations exactly. Otherwise if you’re using the “animation” component then you’ll need to mark the animation as legacy (which is also shown in the example above)

      If you’re still having trouble could you show me the snippet of your script which calls .Play of your animation clip and maybe a screenshot showing the animation you’re trying to play in the project window too?

      Thanks!

Leave a Reply

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