From 9dad34a3871e95b2e39e9ba808ca2ad118494b4a Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Fri, 1 Feb 2019 15:27:43 +0100 Subject: [PATCH] [unity] Fixed on more occurrence of SkeletonGraphic related import error. Error message was 'Skeleton JSON file not set for SkeletonData asset'. Closes #1226. --- .../Editor/spine-unity/Editor/AnimationReferenceAssetEditor.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/AnimationReferenceAssetEditor.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/AnimationReferenceAssetEditor.cs index 726f0ce9a..d8e2df613 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/AnimationReferenceAssetEditor.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/AnimationReferenceAssetEditor.cs @@ -132,6 +132,9 @@ namespace Spine.Unity.Editor { string LastSkinName { get { return EditorPrefs.GetString(LastSkinKey, ""); } } void HandleOnEnablePreview () { + if (ThisSkeletonDataAsset != null && ThisSkeletonDataAsset.skeletonJSON == null) + return; + preview.Initialize(this.Repaint, ThisSkeletonDataAsset, LastSkinName); preview.PlayPauseAnimation(ThisAnimationName, true); preview.OnSkinChanged -= HandleOnSkinChanged;