- Home /
Button Touch Animation
i have two animations "Idle" and "Play" i does not work right on the touch button how can i fix that....
function Update () { if(Input.touchCount >= 0) { var touch : Touch = Input.touches[0];
if(touch.phase != TouchPhase.Ended && touch.phase != TouchPhase.Canceled)
{
animation["Play"].speed= 1.0;
animation.Play("Idle");
}
else
{
animation.CrossFade("Play");
}
} }
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613070936im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Touch GUI texture to toogle animation 0 Answers
Animator has not been initialized?? 3 Answers
Two Animations With One Button Press 1 Answer
How to change UI button animation speed (4.6 UI) 2 Answers
animate sprite in a button event 0 Answers