Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Suniyani · May 02, 2012 at 12:59 AM · animationerror

Animation State could not be played

The Animation State could not be Played, because it could not be found. Is the error I receive. The tutorial that I'm working on is Survival Island from the Packtpub.Unity.3.x.Game.Development.Essentials (Book) I've gotten half way through it and I don't want want to be a quitter. When I throw a coconut on the target is says "The Animation State could not be Played, because it could not be found." Does anyone know what I should do to resolve this problem?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Seth-Bergman · May 02, 2012 at 01:13 AM

To elaborate on above answer, it's trying to play an animation by name, like:

animation.Play("hitAnim");

or just

animation.Play(); (if the object only has one anim, I guess)

So, it can't find the anim in question, which means there is no animation with that name attached to the object in question. (If the line failing is "animation.Play();", that means there is no anim attached). If you select the object, then look at the "Animation" component in the inspector, you can assign the animation there. Often, the first step before you can do this is to split the anims on the model itself, which is done on the .fbx model itself, which you can select in the project pane. Then, with it selected, the FBX importer should become visible in the inspector panel. That's where you can name/split your anims.. If you give more info, it might help..

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image syclamoth · May 02, 2012 at 01:25 AM 0
Share

Good explanation!

avatar image Suniyani · May 02, 2012 at 04:36 PM 0
Share

Thank you all so very much for answering my question. I haven't yet tried it out yet, but I'm certain your advice will work. I'll reply back again once I apply it.

avatar image
0

Answer by syclamoth · May 02, 2012 at 01:00 AM

Presumably, this is happening because the AnimationState that you are retrieving (usually by accessing 'animation[string]') is invalid. Make sure that you're spelling the name of the animation properly, and that the animationClip in question is actually attached to the animation component in the inspector.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image psycoza · May 06, 2012 at 06:36 AM 0
Share

I still couldn't get it to work:( I've added the animation script up and down to the Red Target in the FBX Inspector. The 2 error messages that I receive is "The Animation State could not be Played, because it could not be found Please attach an animation clip with the name 'up' or call this function only for existing animations, and Please attach an animation clip with the name 'down' or call this function only for existing animations.

avatar image syclamoth · May 07, 2012 at 05:26 PM 0
Share

The animation may exist in the FBX importer, but that doesn't mean it's on the object in your scene! Look at the actual animation in your scene, and see if it has the correct animations attached. As previously stated, you need to make sure you spell the names properly.

For this kind of thing, I've gotten into the habit of identifying animations by public AnimationClip references assigned in the inspector- that way I can automatically add them to my animation components if it so happens that they've accidentally become disattached.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can I make animations snap to a frame? 1 Answer

AnimationEvent has no function name specified! 6 Answers

'speed' is not a member of 'Object'. when pausing animation 0 Answers

Timeline error 1 Answer

Unity does not recognize reload animation for gun 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges