Unity Mecanim SetBool("Run", true) don't work !

Hello,

I have created 3 differents animations clips into my Animation Controller :
“Idle”, “Run” and “Walk”

I have created 3 boolean animations parameter into Unity Editor called “Idle”, “Run” and “Walk”.

I have created a csharp script on my character (imported as FBX file) with :

Into Start() :

animator = GetComponent<Animator>();

Into Update () :

myAnimController.setBool("Run", true);

but my character stay Idle, the run clip is not fired :frowning:

What’s the problem ?
Please help…

Thanks a lot

Eviral

it needs to be

 animator.SetBool("Run", true);

not myAnimController. I believe that is what your animator Controller is called? But there is no need to write the name since
you already located the right animator component trough your:

animator = GetComponent<Animator>();

Did you make transitions to those animations which use the bool parameters you added? Right click on your idle. Set it to default so it becomes orange. Right click on idle animation and click make transition. Click on the walk or run animation. On the right, set the transition to happen from the appropriate bool.