I destroy the object by writing the following script. What method should I use to reload?
Animation calls are made using the animation taster tool script of the Spine runtime.
After the animation occurred, the object was deleted as shown in the script below.
After that, I thought it would reload if I setempty in the animation, but it doesn't work.
reload?
How do I put an object in the spine back to setempty state? Let's find it with a script search on Google. Any hints on writing the code?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Spine.Unity;
public class SpineAnimationEndDestory : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
var skeletonAnimation = GetComponentInChildren<SkeletonAnimation>(true);
skeletonAnimation.AnimationState.Complete += (e) =>
{
Destroy(gameObject);
};
}
// Update is called once per frame
void Update()
{
}
}