I can't make my animation playable in game

So i was making a fan game for Metal Sonic and i got the character moving with W A S D keys, but when i started to upload his animation (idle) i couldn’t.
I checked the Console log but there wasn’t any errors.
And i couldn’t set my layer default.
How can i fix this? Can somebody help?

Animation is very much a thing that won’t be learned in this little tiny textbox.

I recommend starting with the basic Unity Learn tutorials on MecAnim, perhaps adding some other highly-rated Youtube animation tutorials.

Two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.

Anything with Animations / Animators / Mechanim:

Only consider the code AFTER you have done this critical step:

Always start with the Animator state machine and prove it works in isolation, no code at all.

Here’s more reading:

1 Like

Thank you for helping, i will do what you told to me. I wish you success! :smiley: