画属性按钮
using UnityEngine;
using System.Collections;
public enum h
{
mon=0,
tus,
wen,
}
public class DataInEditer : MonoBehaviour {
public int int_Editer=1;
public h today=h.wen;
public AnimationCurve curve;
}
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(DataInEditer))]
public class EditorData : Editor {
public override void OnInspectorGUI (){
NGUIEditorTools.SetLabelWidth(100f);
NGUIEditorTools.DrawProperty("Scaling Style", serializedObject, "int_Editer");
NGUIEditorTools.DrawProperty("Scaling Style", serializedObject, "int_Editer");
NGUIEditorTools.SetLabelWidth(80f);
NGUIEditorTools.DrawProperty("today", serializedObject, "today");
NGUIEditorTools.DrawProperty("curve", serializedObject, "curve");
}
}
效果图