Skip to content

Selectable Enum

[SelectableEnum] attribute display enums in user-friendly menu with search feature.


Support Types

All enum types.


Parameters

Parameter Name Description
Sort Automatically sort enum values.
Height Set max menu height.
DisableValues Array of enum values, which should be disabled.
HideValues Array of enum values, which should be hided.

Examples

[SelectableEnum]
public KeyCode key;

[SelectableEnum(Sort = true)]
public KeyCode key;

[SelectableEnum(DisableValues = new string[1] { "None" })]
public KeyCode key;

[SelectableEnum(Sort = true, HideValues = new string[1] { "None" })]
public KeyCode key;
Note

Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.

using ApexInspector;


Demo

using ApexInspector;
using UnityEngine;

public class ExampleComponent : MonoBehaviour
{
    [SelectableEnum]
    public KeyCode value;
}

Live-demo

Live demo