Skip to content

Commit

Permalink
[unity] Fixed Timeline SpineAnimationStateClip ignoring seek and loop.
Browse files Browse the repository at this point in the history
…Closes EsotericSoftware#2316. Removed redundant multiple skeleton updates when multiple animations are started.
  • Loading branch information
HaraldCsaszar committed Jul 11, 2023
1 parent f759199 commit d4cc163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Expand Up @@ -165,7 +165,7 @@ ScriptPlayable<SpineAnimationStateBehaviour>[] startingClips
for (int i = 0; i < inputCount; i++) {
float lastInputWeight = lastInputWeights[i];
float inputWeight = playable.GetInputWeight(i);
bool clipStarted = lastInputWeight == 0 && inputWeight > 0;
bool clipStarted = (lastInputWeight == 0 && inputWeight > 0) || info.seekOccurred || info.timeLooped;
if (inputWeight > 0)
anyClipPlaying = true;
lastInputWeights[i] = inputWeight;
Expand Down Expand Up @@ -231,10 +231,9 @@ ScriptPlayable<SpineAnimationStateBehaviour>[] startingClips

timelineStartedTrackEntry = trackEntry;
}
//else Debug.LogWarningFormat("Animation named '{0}' not found", clipData.animationName);
}

// Ensure that the first frame ends with an updated mesh.
}
if (numStartingClips > 0) {
if (skeletonAnimation) {
skeletonAnimation.Update(0);
skeletonAnimation.LateUpdate();
Expand Down
Expand Up @@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.timeline",
"displayName": "Spine Timeline Extensions",
"description": "This plugin provides integration of spine-unity for the Unity Timeline.\n\nPrerequisites:\nIt requires a working installation of the spine-unity and spine-csharp runtimes as UPM packages (not as spine-unity unitypackage), version 4.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
"version": "4.1.9",
"version": "4.1.10",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",
Expand Down

0 comments on commit d4cc163

Please sign in to comment.