This has worked for me
using UnityEngine;
using Spine.Unity;
using Spine;
using UnityEngine.SceneManagement;
public class DoorTransition : MonoBehaviour
{
public SkeletonAnimation SkelAnim;
[SpineAnimation]
public string DoorClose;
bool TimerStarted = false;
private float _timer = 0f;
public float LoadLevelDelay = 1f;
void Awake()
{
SkelAnim = GetComponent<SkeletonAnimation>();
}
private void StartDoor()
{
TimerStarted = true;
SkelAnim.state.SetAnimation(0, DoorClose, false);
}
void Update()
{
if (TimerStarted)
{
_timer += Time.deltaTime;
if (_timer >= LoadLevelDelay)
{
SceneManager.LoadScene("LevelOne");
}
}
}
}