> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksenumdrawer.md).

# Class ksEnumDrawer

Namespace: [KS.Reactor.Client.Unity.Editor](/reactor/api-reference/ks.reactor.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

Property drawer for enums with the [ksEnumAttribute](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksenumattribute.md). Converts our naming standard (ENUM\_VALUE) to a more readable display name (Enum Value).

```csharp
[CustomPropertyDrawer(typeof(ksEnumAttribute))]
public class ksEnumDrawer : PropertyDrawer
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† GUIDrawer â† PropertyDrawer â† [ksEnumDrawer](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksenumdrawer.md)

#### Inherited Members

PropertyDrawer.OnGUI(Rect, SerializedProperty, GUIContent), PropertyDrawer.CreatePropertyGUI(SerializedProperty), PropertyDrawer.GetPropertyHeight(SerializedProperty, GUIContent), PropertyDrawer.CanCacheInspectorGUI(SerializedProperty), PropertyDrawer.attribute, PropertyDrawer.fieldInfo, PropertyDrawer.preferredLabel, [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Methods

### GetEnumDisplayName(string) <a href="#ks_reactor_client_unity_editor_ksenumdrawer_getenumdisplayname_system_string" id="ks_reactor_client_unity_editor_ksenumdrawer_getenumdisplayname_system_string"></a>

Converts an enum name from our naming standard (ENUM\_VALUE) to a more readable format (Enum Value).

```csharp
public static string GetEnumDisplayName(string enumName)
```

#### Parameters

`enumName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The enum name to convert to a display name.

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

Display name for the enum value.

### GetEnumDisplayNames(SerializedProperty) <a href="#ks_reactor_client_unity_editor_ksenumdrawer_getenumdisplaynames_unityeditor_serializedproperty" id="ks_reactor_client_unity_editor_ksenumdrawer_getenumdisplaynames_unityeditor_serializedproperty"></a>

Converts a property's enum names from our naming standard (ENUM\_VALUE) to a more readable format (Enum Value).

```csharp
public static GUIContent[] GetEnumDisplayNames(SerializedProperty property)
```

#### Parameters

`property` SerializedProperty

Enum property to get display names for.

#### Returns

GUIContent\[]

Display names for the enum values.

### GetEnumDisplayNames(string\[]) <a href="#ks_reactor_client_unity_editor_ksenumdrawer_getenumdisplaynames_system_string" id="ks_reactor_client_unity_editor_ksenumdrawer_getenumdisplaynames_system_string"></a>

Converts enum names from our naming standard (ENUM\_VALUE) to a more readable format (Enum Value).

```csharp
public static GUIContent[] GetEnumDisplayNames(string[] enumNames)
```

#### Parameters

`enumNames` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

The enum names to convert to display names.

#### Returns

GUIContent\[]

Display names for the enum values.

### OnGUI(Rect, SerializedProperty, GUIContent) <a href="#ks_reactor_client_unity_editor_ksenumdrawer_ongui_unityengine_rect_unityeditor_serializedproperty_un" id="ks_reactor_client_unity_editor_ksenumdrawer_ongui_unityengine_rect_unityeditor_serializedproperty_un"></a>

Draws the property.

```csharp
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
```

#### Parameters

`position` Rect

Position to draw at.

`property` SerializedProperty

Property to draw.

`label` GUIContent

Label for the property.
