Add new Bones animation
This commit is contained in:
15
Assets/AnimationPlayer.cs
Normal file
15
Assets/AnimationPlayer.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user