Wait. So your steps are:
//have mixing.
state.SetAnimation(0, "key a slot on", false);
//wait 0.5 seconds or something
state.SetAnimation(0, "interrupts the first animation", false);
state.SetAnimation(1, "key the slot off", false);
Is that correct? And the end result SHOULD be that the slot is empty.
But you end up with it being nulled for one frame and then coming back on?
08 Jul 2016 8:07 am
You said a bunch of things about removing a line from AnimationState or changing AttachmentTimeline.Apply. It's not clear what your current state is at the moment.
08 Jul 2016 8:36 am
using UnityEngine;
using System.Collections;
using Spine;
using Spine.Unity;
public class OneFrameRepro : MonoBehaviour {
[SpineAnimation]
public string keyOn, keyOff, somethingElse;
IEnumerator Start () {
var skeletonAnimation = GetComponent<SkeletonAnimation>();
var state = skeletonAnimation.state;
state.Data.defaultMix = 0.5f; // 0.5 second crossfade.
state.SetAnimation(0, keyOn, true); // 1 second animation of the slot being keyed with an attachment.
yield return new WaitForSeconds(0.3f);
state.SetAnimation(0, somethingElse, true); // interrupt first animation. just translates the root bone.
state.SetAnimation(1, keyOff, true); // 1 second animation of the slot being keyed null.
// slot is empty at the end of the animations. nothing unusual happened.
}
}
I did the above and the result was that it nulled the slot successfully. And no one-frame bug.
Used the latest spine-unity.
There must be something else going on.
@yookuna. Your issue is not the same. Your issue is from expected behavior. Please see the other topic.