mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-28 20:51:38 +08:00
Merge branch '4.0' into 4.1-beta
This commit is contained in:
commit
8a89b7399a
@ -48,9 +48,39 @@ namespace Spine.Unity.Playables {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var scriptPlayable = ScriptPlayable<SpineAnimationStateMixerBehaviour>.Create(graph, inputCount);
|
var scriptPlayable = ScriptPlayable<SpineAnimationStateMixerBehaviour>.Create(graph, inputCount);
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
WarnIfDuplicateTrackIndex();
|
||||||
|
#endif
|
||||||
var mixerBehaviour = scriptPlayable.GetBehaviour();
|
var mixerBehaviour = scriptPlayable.GetBehaviour();
|
||||||
mixerBehaviour.trackIndex = this.trackIndex;
|
mixerBehaviour.trackIndex = this.trackIndex;
|
||||||
return scriptPlayable;
|
return scriptPlayable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
static float lastWarningTime = 0;
|
||||||
|
|
||||||
|
public void WarnIfDuplicateTrackIndex () {
|
||||||
|
if (Time.frameCount == lastWarningTime) // only warn once.
|
||||||
|
return;
|
||||||
|
lastWarningTime = Time.frameCount;
|
||||||
|
|
||||||
|
var rootTracks = timelineAsset.GetRootTracks();
|
||||||
|
List<int> trackIndices = new List<int>();
|
||||||
|
int trackFromTop = -1; // first invisible track is marker track, skipped.
|
||||||
|
foreach (var track in rootTracks) {
|
||||||
|
++trackFromTop;
|
||||||
|
if (track.GetType() != typeof(SpineAnimationStateTrack))
|
||||||
|
continue;
|
||||||
|
var animationStateTrack = (SpineAnimationStateTrack)track;
|
||||||
|
int trackIndex = animationStateTrack.trackIndex;
|
||||||
|
if (trackIndices.Contains(trackIndex)) {
|
||||||
|
Debug.LogWarning(string.Format("Please change the 'Track Index' Inspector property " +
|
||||||
|
"at Track number {0} from the top, both tracks are setting animations at track index '{1}'.",
|
||||||
|
trackFromTop, trackIndex));
|
||||||
|
} else
|
||||||
|
trackIndices.Add(trackIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.timeline",
|
"name": "com.esotericsoftware.spine.timeline",
|
||||||
"displayName": "Spine Timeline Extensions",
|
"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.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
"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.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||||
"version": "4.1.1",
|
"version": "4.1.2",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.timeline",
|
"name": "com.esotericsoftware.spine.timeline",
|
||||||
"displayName": "Spine Timeline Extensions",
|
"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)",
|
"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.1",
|
"version": "4.1.2",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user