Mecanim references to locations (script c#)

Hi,

For some reason, Unity can’t find a reference to the Layers of mecanim even though they match in the animator:

Here are the references in my script:

`static int idleState = Animator.StringToHash(“Char.Idle”);
static int runState = Animator.StringToHash(“Char.Run”);

anim.SetBool (“Run”, true);`

I’ve no idea why, thanks for the help in advance.

Seems it’s a bug, added Animator in a two by three screen… Reset the scripts and Animator every time I made a change to any of them. Works fine…

If you don’t reset Animator another error appears saying the Animator could not be loaded.