EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.35k stars 2.89k forks source link

[unity] Timeline: SpineAnimationStateClip as SetEmptyAnimation doesn't abide Blend Duration unless Custom Duration is checked #1778

Closed Jamez0r closed 3 years ago

Jamez0r commented 3 years ago

When using a SpineAnimationStateClip with no AnimationReferenceAsset (in order to SetEmptyAnimation), the mix timing of the empty animation does not abide by the Blend In Duration of the clip unless Custom Duration is checked.

To repro: 1) Place a normal SpineAnimationStateClip with an AnimationReferenceAsset into the timeline track 2) Add a SpineAnimationStateClip without a reference asset to the right side of the first clip (to SetEmptyAnimation). 3) Expand the empty clip to be longer, and then drag it backwards to blend over the first clip with a long Blend In Duration / Mix Duration. 4) Run the game, and run the timeline - I think the SetEmptyAnimation will use default mixing? It mixes in around 0.1 - 0.2s for me regardless of the Blend. 5) Now switch the empty clip to use Custom Duration (keeping Use Blend Duration checked, and the long Mix Duration). 6) Run the game, run the timeline - the SetEmptyAnimation now uses the long Mix Duration

HaraldCsaszar commented 3 years ago

This behaviour is the same for using an empty animation or an animation reference asset: As described on the documentation page, behaviour is as follows: http://esotericsoftware.com/spine-unity#Spine-AnimationState-Track

Custom duration. When enabled, the value under Mix Duration below is used for transitions from the previous animation to this animation. When disabled, it will use the setup Mix Duration value at the SkeletonData asset for the animation pair.