using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayAnimationAtRandomFrame : MonoBehaviour { Animator animator; private void Awake() { animator = GetComponent(); } private void Start() { animator.Play(0, 0,Random.Range(0, animator.GetCurrentAnimatorStateInfo(0).length)); } }