using System; using System.Collections; using System.Collections.Generic; using Spine.Unity; using UnityEngine; public class PlaySpineAni : MonoBehaviour { public SkeletonGraphic spine; [SerializeField] private int trackIndex; [SerializeField] private string spineAniName; [SerializeField] private bool loop = false; private void Awake() { spine = GetComponent(); } private void OnEnable() { spine.AnimationState.SetAnimation(0, spineAniName, loop); } // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } }