restart animation unity

Code Example - restart animation unity

                
                        myAnimator.Play("Roll", -1, 0f);
//If the animation has an exit time set up in the animator view, this would make
//it not play. If it needs to finish, make sure to call when the animation is finished