unity script code to run animation code example Example: play animation through script unity animator.Play("StateName");