mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Fixed SpineAnimationClip Inspector slowing down Editor. Closes #3007.
This commit is contained in:
parent
690b4bac40
commit
dd6fae39db
@ -97,9 +97,8 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
|
||||
protected TimelineClip FindTimelineClip (SpineAnimationStateClip targetClip) {
|
||||
string[] guids = AssetDatabase.FindAssets("t:TimelineAsset");
|
||||
foreach (string guid in guids) {
|
||||
TimelineAsset timeline = (TimelineAsset)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guid), typeof(TimelineAsset));
|
||||
string assetPath = AssetDatabase.GetAssetPath(targetClip);
|
||||
TimelineAsset timeline = AssetDatabase.LoadAssetAtPath<TimelineAsset>(assetPath);
|
||||
foreach (TrackAsset track in timeline.GetOutputTracks()) {
|
||||
foreach (TimelineClip clip in track.GetClips()) {
|
||||
if (clip.asset.GetType() == typeof(SpineAnimationStateClip) && object.ReferenceEquals(clip.asset, targetClip)) {
|
||||
@ -107,7 +106,6 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -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.3.20 or newer.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||
"version": "4.3.20",
|
||||
"version": "4.3.21",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user