Files
unity-flash-tools/Assets/FlashTools/Scripts/Internal/Editor/SwfManagerEditor.cs
2016-08-26 23:02:18 +07:00

33 lines
745 B
C#

using UnityEngine;
using UnityEditor;
namespace FlashTools.Internal {
[CustomEditor(typeof(SwfManager))]
public class SwfManagerEditor : Editor {
SwfManager _manager = null;
void DrawAnimationCount() {
var last_gui_enabled = GUI.enabled;
GUI.enabled = false;
EditorGUILayout.IntField(
"Animation count",
_manager.AllAnimationCount);
GUI.enabled = last_gui_enabled;
}
// ------------------------------------------------------------------------
//
// Messages
//
// ------------------------------------------------------------------------
void OnEnable() {
_manager = target as SwfManager;
}
public override void OnInspectorGUI() {
DrawDefaultInspector();
DrawAnimationCount();
}
}
}