[unity] Cleanup SkeletonDataAssetInspector

This commit is contained in:
John 2017-12-11 00:37:12 +08:00 committed by GitHub
parent 1dda8f5890
commit 4048e6b7f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,15 +120,6 @@ namespace Spine.Unity.Editor {
}
void HandlePreviewSkinChanged (string skinName) {
EditorPrefs.SetString(LastSkinKey, skinName);
}
void OnDestroy () {
EditorApplication.update -= EditorUpdate;
preview.OnDestroy();
}
void EditorUpdate () {
preview.AdjustCamera();
@ -498,13 +489,6 @@ namespace Spine.Unity.Editor {
EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(line, Icons.warning));
}
void DoReimport () {
SpineEditorUtilities.ImportSpineContent(new [] { AssetDatabase.GetAssetPath(skeletonJSON.objectReferenceValue) }, true);
preview.Clear();
InitializeEditor();
EditorUtility.SetDirty(targetSkeletonDataAsset);
}
void PopulateWarnings () {
warnings.Clear();
@ -567,6 +551,22 @@ namespace Spine.Unity.Editor {
}
}
void DoReimport () {
SpineEditorUtilities.ImportSpineContent(new [] { AssetDatabase.GetAssetPath(skeletonJSON.objectReferenceValue) }, true);
preview.Clear();
InitializeEditor();
EditorUtility.SetDirty(targetSkeletonDataAsset);
}
void HandlePreviewSkinChanged (string skinName) {
EditorPrefs.SetString(LastSkinKey, skinName);
}
void OnDestroy () {
EditorApplication.update -= EditorUpdate;
preview.OnDestroy();
}
#region Preview Handlers
override public bool HasPreviewGUI () {
if (serializedObject.isEditingMultipleObjects)