Files
Crash-Course/Assets/AnimationPlayer.cs
2025-01-15 16:04:20 -05:00

16 lines
286 B
C#

using UnityEngine;
[RequireComponent(typeof(Animator))]
public class AnimationPlayer : MonoBehaviour
{
public AnimationClip clip;
private Animator animator;
private void Start()
{
animator = GetComponent<Animator>();
animator.Play(clip.name);
}
}