Forum rules - please read before posting.

Animation error

I am getting an error, something to do with Animation, maybe on the player. But my Player has no Animation. He is a single frame sprite that moves left and right. I may exchange him for a walking sprite sheet one day, but for now, this is all I need. What the error all about?

Animator.GotoState: State could not be found
UnityEngine.Animator:Play(String, Int32)
AC.AnimEngine_SpritesUnity:PlayStandardAnim(String, Boolean) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:623)
AC.AnimEngine_SpritesUnity:PlayIdle() (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:549)
AC.Char:AnimUpdate() (at Assets/AdventureCreator/Scripts/Character/Char.cs:670)
AC.Char:_Update() (at Assets/AdventureCreator/Scripts/Character/Char.cs:395)
AC.NPC:_Update() (at Assets/AdventureCreator/Scripts/Character/NPC.cs:94)
AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:309)

Comments

  • edited October 2015
    Exactly, you have animator controller that still exists and possibly some action still calls for an animation that you no longer have e.g. you got deleted your animation but it is still in your animator controller.
  • Nope its not that.
    Ill break it down..
    Heres snakefoot:
    image
    He just has a animation clip, that stretches him up and down. In the olden days I would just have used Legacy and and Animation component. If I do this, I get console error that the clip needs to be marked as Legacy, but cannot find where.. I don't know where this is... if I click on the clip its-self (created IN Unity Animation window) I see:
    image
    No where to "set as Legacy".

    The "other way" that Im trying, is the "new improved" mecanim way..

    So.. Snakefoot has an Animator Component:
    image

    This requires a Controller: that when clicked looks like this:
    image

    ...where snakefoot idle is the previously mentioned Animation clip:
    Its THIS combination that works - visually... but generates the +999 yellow errors printed above.

    there are NO other NPCs (apart from a mouse thats not animated apart from looping on a path. ) 
    no other animations (apart from things in the AC demo folder... can I delete this by the way, I copied the demo managers out and renamed them...)



  • If your player only has one frame, uncheck Multiple directions? in his Inspector.  Also consider upgrading to v1.49 - it'll give you a more detailed error message if it can't play an animation.
  • Im nervous to import a new version over the top of the old. Mainly to wipe the input settings.
    Although Im pretty sure Im just using the AC defaults.
    Should I hook off the "project settings" on the import dialogue? Or is important that I update them too?

    Mark
  • So long as you back up beforehand, you can't really go wrong.  I'd say you can uncheck of the settings assets - the main thing is the AdventureCreator folder itself.  AC will inform you of any missing inputs it needs.
  • Hmm it looks fine to me. Sure your action list calls for the right animation name "snakefoot_idle" ?

    I have lots of animations with long names, and sometimes I call the wrong one, just because the names are not fitted in the actions, that is why I thought your error was related to mine.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.