- Home /
Unity 5 Controlling Animation with UI Button
I Am Seriously Getting Upset with this Project, I want my Human Character to animate after clicking a UI Button but it just doesnt animate at all. Everyone has this problem but no one ever makes videos or tutorials on it. May someone help me or fix my script if there is any problems? i dont have much but this is it. (btw the character is a mesh from blender with my own animations) using UnityEngine; using System.Collections;
public class player : MonoBehaviour {
public Animator anim;
// Use this for initialization
void Start ()
{
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update ()
{
}
public void Dab()
{
anim.Play ("Dab", -1, 0f);
}
}
Comment
Your answer
Follow this Question
Related Questions
Delay Button Pressed Action after Animation 1 Answer
Button animator not playing. 0 Answers
Play an animation when UI button is pressed 0 Answers
UI Button not working - Click changes colour but no event 1 Answer
Material Design Menu 1 Answer