Cool,
it is what I was looking for.
If somebody would like to implement it to Unity Timelines you need to do some changes. The most important ones are:
In SpineAnimationStateMixerBehaviour.cs
[...]
if (clipData.animationReference.Animation != null) {
Spine.TrackEntry trackEntry = state.SetAnimation(trackIndex, clipData.animationReference.Animation, clipData.loop);
trackEntry.EventThreshold = clipData.eventThreshold;
trackEntry.DrawOrderThreshold = clipData.drawOrderThreshold;
trackEntry.TrackTime = (float)inputPlayable.GetTime() * (float)inputPlayable.GetSpeed();
trackEntry.TimeScale = (float)inputPlayable.GetSpeed();
trackEntry.AttachmentThreshold = clipData.attachmentThreshold;
trackEntry.HoldPrevious = clipData.holdPrevious;
// ========== ADD LINE ===========
trackEntry.Alpha = clipData.customMixWeight; // <
---
THIS
if (clipData.customDuration)
trackEntry.MixDuration = clipData.mixDuration;
timelineStartedTrackEntry = trackEntry;
}
[...]
dummyAnimationState.Update(0);
dummyAnimationState.Apply(skeleton);
} else {
if (toAnimation != null)
// ========== CHANGE LINE ===========
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, clipData.customMixWeight, MixBlend.Setup, MixDirection.In); // <
---
THIS
}
skeleton.UpdateWorldTransform();
You need to also add properties (e.g. customMixWeight) according to your needs in SpineAnimationStateDrawer.cs so it will look similar to: