- Home /
Question by
moumni-mohamed · Dec 13, 2016 at 02:08 AM ·
c#animationbutton
ui button animation finish
this code i use it on ui button for change between animation (up,down)for plarform,but when i click the up begun and still working i click again the down begun working but it cut the up animation. how can fix that to white the up animation and begun the down?
public Animator anim ; private bool move1; void Start () { anim = GetComponent (); } // Update is called once per frame public void ChangePlatform () { if (move1==true) { anim.SetInteger ("animstate",1); move1 = false; }else if (move1==false) { anim.SetInteger ("animstate",2); move1 = true; }
Comment
In Animator window, check to see if Has Exit Time for these animations is unchecked?