[unity] Fixed on more occurrence of SkeletonGraphic related import error. Error message was 'Skeleton JSON file not set for SkeletonData asset'. Closes #1226.

This commit is contained in:
Harald Csaszar 2019-02-01 15:27:43 +01:00
parent 52245d55f0
commit 9dad34a387

View File

@ -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;