// destroy the game object if the animator has finished its animation if (anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1) { Destroy(gameObject); }