Ok this can be a bit daunting but i'll run you through it. With the animator component you need to use the animator tab and switch between the different states via blend trees etc. Animator tab is here
You create an Idle state and assign your idle animation as shown here:
Now all you need to do is tell Mecanim to move between the difference states depending on what you're doing, in my controller script thats attached to my character when I press Forward or backward (Vertical axis 1 or -1) my code does the following(cut down for clarity):
Note where I do anim.SetBool() that sets the variables you define in the animator which tell mecanim when to switch between the animations.
void Start() {
// Get the animator associated with this character
myAnimator = transform.GetComponent<Animator>();
}
void Update() {
// Lots of other stuff
if(Input.GetAxis("Vertical")>0){ // Forward
transform.position += transform.forward * speed;
anim.SetBool ("isWalking", true);
}
if(Input.GetAxis("Vertical")<0){ // Backward
transform.position += -transform.forward * speed;
anim.SetBool ("isWalkingBack", true);
}
if(Input.GetAxis("Vertical")==0){
// We're neither walking forward or back so stop animating.
anim.SetBool ("isWalkingBack", false);
anim.SetBool ("isWalking", false);
}
}
There's a tutorial here from Unity themselves.
Trust me I really feel your pain with this its a bit of a steep learning curve but once you get your head around it things start to get a lot easier.