how to keep track of the animation playing unity code example Example: play animation through script unity animator.Play("StateName");