mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
Added .sln for spine-csharp that compiles under MonoDevelop. Modifie spine-csharp.csproj to compile under MonoDevelop (mac).
28 lines
752 B
C#
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();
|
|
}
|
|
}
|
|
} |