コード例 #1
0
        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);
            }
        }
コード例 #2
0
        protected override void OnLayoutDraw()
        {
            Enum enumValue = (Enum)Enum.ToObject(EnumType, Value);

            Value = (Enum)EGUILayout.DrawEnumButton(Text, enumValue, LayoutOptions);
        }