# enumDisplayNames

> Display-friendly names of enumeration of an enum property.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public string[] enumDisplayNames { get; }
```

### Remarks

Similar to enumNames, but formatted with spaces and capitalization.

Additional Resources: [SerializedProperty.enumNames](/engine/6000.7/script-reference/unityeditor/serializedproperty/enumnames.md), [SerializedProperty.propertyType](/engine/6000.7/script-reference/unityeditor/serializedproperty/propertytype.md), [SerializedPropertyType.Enum](/engine/6000.7/script-reference/unityeditor/serializedpropertytype/enum.md), [SerializedProperty.enumValueIndex](/engine/6000.7/script-reference/unityeditor/serializedproperty/enumvalueindex.md), [InspectorNameAttribute](/engine/6000.7/script-reference/unityengine/inspectornameattribute.md).

### Examples

```csharp
using UnityEditor;
using UnityEngine;

public enum OptionEnum
{
    ValueFirst = 1,
    ValueSecond = 2,
    ValueThird = 3,

    [InspectorName("Value 4 - Best choice")]
    ValueForth = 4,

    [InspectorName("Value 5 - Avoid")]
    ValueFifth = 5,

    None = 0
}

public class EnumDisplayNameExample : ScriptableObject
{
    public OptionEnum MyEnum = OptionEnum.ValueForth;

    [MenuItem("Example/SerializedProperty enumDisplayName Example")]
    static void MenuCallbackup()
    {
        EnumDisplayNameExample obj = ScriptableObject.CreateInstance<EnumDisplayNameExample>();
        SerializedObject serializedObject = new SerializedObject(obj);
        SerializedProperty enumProperty = serializedObject.FindProperty("MyEnum");

        // Print the members of the enum, sorted by value
        // Will output:
        // Names: None,ValueFirst,ValueSecond,ValueThird,ValueForth,ValueFifth
        Debug.Log("Names: " + string.Join(",", enumProperty.enumNames));

        //The display names show the InspectorName string when specified,
        //otherwise a more human readable version of the enum member name
        //Will output:
        //Display names: None,Value First,Value Second,Value Third,Value 4 - Best choice,Value 5 - Avoid
        Debug.Log("Display names: " + string.Join(",", enumProperty.enumDisplayNames));

        //Will output:
        //Current value: Value 4 - Best choice
        Debug.Log("Current value: " + enumProperty.enumDisplayNames[enumProperty.enumValueIndex]);
    }
}
```
