protected override void OnDrawProperty(string label) { label = label ?? ""; object value = DrawerProperty.Value; EditorGUI.BeginChangeCheck(); { value = EGUILayout.DrawEnumButton(label, (Enum)value, GetLayoutOptions()); } if (EditorGUI.EndChangeCheck()) { DrawerProperty.Value = Enum.ToObject(DrawerProperty.ValueType, value); } }
protected override void OnLayoutDraw() { Enum enumValue = (Enum)Enum.ToObject(EnumType, Value); Value = (Enum)EGUILayout.DrawEnumButton(Text, enumValue, LayoutOptions); }