Files
Crash-Course/Assets/AnimationPlayer.cs

16 lines
286 B
C#
Raw Normal View History

2025-01-15 16:04:20 -05:00
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);
}
}