if (collectToasterSpine == null)
{
collectToasterSpine = Instantiate(ToasterSpine);
collectToasterSpine.transform.SetParent(Root.transform);
}
collectToasterSpine.transform.localPosition = new Vector3(4, 2, 0);
if (collectToasterAnimation == null)
{
collectToasterAnimation = collectToasterSpine.GetComponent<SkeletonAnimation>();
collectToasterAnimation.clearStateOnDisable = true;
//设置true 首帧偶现显示stup状态 设置为false 首帧显示path最后一帧
}
if (!collectToasterAnimation.enabled)
{
collectToasterAnimation.enabled = true;
}
TrackEntry trackEntry = collectToasterAnimation.state.SetAnimation(0, "path", false);
trackEntry.Complete += (TrackEntry entry) =>
{
collectToasterSpine.transform.localPosition = new Vector3(5, 2, 0);
collectToasterAnimation.enabled = false;
};
第一次播放没有问题 在第二次播放的时候首帧显示错误 请问是什么原因导致的