Calvin Rien 3dd401b342 Made Unity project directory structure more plugin compliant.
Added .sln for spine-csharp that compiles under MonoDevelop.  Modifie spine-csharp.csproj to compile under MonoDevelop (mac).
2013-04-15 18:04:13 -07:00

28 lines
752 B
C#

using System;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(AtlasAsset))]
public class AtlasAssetInspector : Editor {
private SerializedProperty atlasFile, material;
void OnEnable () {
atlasFile = serializedObject.FindProperty("atlasFile");
material = serializedObject.FindProperty("material");
}
override public void OnInspectorGUI () {
serializedObject.Update();
AtlasAsset asset = (AtlasAsset)target;
EditorGUIUtility.LookLikeInspector();
EditorGUILayout.PropertyField(atlasFile);
EditorGUILayout.PropertyField(material);
if (serializedObject.ApplyModifiedProperties() ||
(Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed")
) {
asset.Clear();
}
}
}