Skip to content

Commit

Permalink
[unity] Cleanup SkeletonDataAssetInspector
Browse files Browse the repository at this point in the history
  • Loading branch information
pharan authored Dec 10, 2017
1 parent 1dda8f5 commit 4048e6b
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,6 @@ void InitializeEditor () {

}

void HandlePreviewSkinChanged (string skinName) {
EditorPrefs.SetString(LastSkinKey, skinName);
}

void OnDestroy () {
EditorApplication.update -= EditorUpdate;
preview.OnDestroy();
}

void EditorUpdate () {
preview.AdjustCamera();

Expand Down Expand Up @@ -498,13 +489,6 @@ void DrawWarningList () {
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();

Expand Down Expand Up @@ -567,6 +551,22 @@ void PopulateWarnings () {
}
}

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)
Expand Down

0 comments on commit 4048e6b

Please sign in to comment.