mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[unity] Fixed Timeline SkeletonGraphic clip exception when DefaultMixDuration is disabled. Closes #2090. Same bugfix as in commit d796131 on 4.1-beta branch.
This commit is contained in:
parent
b46f55b25b
commit
6bf587057f
@ -30,6 +30,7 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.ComponentModel;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
using UnityEngine.Timeline;
|
||||
@ -45,6 +46,13 @@ namespace Spine.Unity.Playables {
|
||||
public int trackIndex = 0;
|
||||
|
||||
public override Playable CreateTrackMixer (PlayableGraph graph, GameObject go, int inputCount) {
|
||||
IEnumerable<TimelineClip> clips = this.GetClips();
|
||||
foreach (TimelineClip clip in clips) {
|
||||
var animationStateClip = clip.asset as SpineAnimationStateClip;
|
||||
if (animationStateClip != null)
|
||||
animationStateClip.timelineClip = clip;
|
||||
}
|
||||
|
||||
var scriptPlayable = ScriptPlayable<SpineAnimationStateMixerBehaviour>.Create(graph, inputCount);
|
||||
var mixerBehaviour = scriptPlayable.GetBehaviour();
|
||||
mixerBehaviour.trackIndex = this.trackIndex;
|
||||
|
||||
@ -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 runtime (via the spine-unity unitypackage), version 4.0.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||
"version": "4.0.10",
|
||||
"version": "4.0.11",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
@ -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.0.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||
"version": "4.0.10",
|
||||
"version": "4.0.11",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user