19 lines
377 B
C#
19 lines
377 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PlayAnimationAtRandomFrame : MonoBehaviour
|
|
{
|
|
Animator animator;
|
|
|
|
private void Awake()
|
|
{
|
|
animator = GetComponent<Animator>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
animator.Play(0, 0,Random.Range(0, animator.GetCurrentAnimatorStateInfo(0).length));
|
|
}
|
|
}
|