Issues with my animation

Hello, I have a little dude in my world and, for the life of me, I can’t get him to run the animations idle or running. I have both animation and animator components attached to the model. I also have a script that handles the animation for this character. But when i run it, it is yelling at me that the animations idle or run does not exist. It also states that I should change the animation type to Legacy. I have done this, but in doing so, my character just stands still and does not move. What can I do in this case? I will include the following pics to help visualize my issue. Many thanks in advance!

Here is the code that I am using to handle the animation

using UnityEngine;
using System.Collections;

public class CharacterAnimationManager : MonoBehaviour {
	/// <summary>
	/// Setting the states for the animation
	/// </summary>
	public enum CharacterAnimation { Idle, Run}
	public CharacterAnimation CurrentAnimation;

	// Use this for initialization
	void Start () {
		CurrentAnimation = CharacterAnimation.Idle;
	}
	
	// Update is called once per frame
	void Update () {
		switch (CurrentAnimation) 
		{
		case CharacterAnimation.Idle:
			animation.Play("Idle");
			break;
		case CharacterAnimation.Run:
			animation.Play("Run");
			break;
		}
	}
}

I guess you don’t want to use mecanim, so here is the answer to your problem:

  1. Select the animation in the project window.
  2. Right click on the inspector tab, literally on the tab.
  3. Select “Debug”.
  4. Change the “Animation Type” to 1

This may help if the first guide does not work: