Animation Not Playing - VideoExplanation

Hello everyone,
Im trying to play an animation by pressing a button. Heres a 1 of I made the animation.

So, basically you see how it’s not playing even though Its running the command and how I made the animation.
What am I missing?
Yes, I’ve checked if the animation is legacy…

Thank you for your time.

I don’t like to put a whole lot of code but If you want to review it, I greatly appreciate it!
This is the script attached to the gui, it enables the button for the DPad.

public class DirectionPad : MonoBehaviour {

	bool _downPressed;
	Animation playerTempANim;

	GUISkin mySkin;
	// Use this for initialization
	void Start () {

		mySkin = GetComponent<newGUI>().mySkin;
		_downPressed = false;

	// Update is called once per frame
	void Update () {

	void FixedUpdate(){


	void OnGUI(){ = mySkin;
		if(GUI.RepeatButton(new Rect(Screen.width - (75 * 2) - 10, Screen.height - 75, 65, 65),"", "Dpad_ArrowD")){
		//	Debug.Log ("Pressing");
			_downPressed = true;

		}else {
		//	Debug.Log ("not Pressing");
			_downPressed = false;

	void PlayAnimation(){

		if(playerTempANim == null)
			playerTempANim = GameObject.Find("testAnimation").GetComponent<Animation>();

		Debug.Log ("Playing " + playerTempANim.animation);


So go to the animation and change the WrapMode to Loop. Otherwise it might be playing the animation once. This looks like a walk animation so you definitely want to loop that.

Also I noticed that you are doing this in your “Update()” function. That could also be another problem. A better thing to do is check for a button press on “FixedUpdate()”.

Also make sure playerTempAnim in your code knows what Animation component to look at. I didn’t see anything telling what playerTempAnim was.

EDIT: I also notice you never tell it to run this animation on a button press of any kind, just in the update. Make sure to tell it to run this on you press some button. Otherwise it could cause jitter or keep looping the first second of the animation.


Sorry to bump this haha merry christmas ^^