[SearchableEnum]

Displays an enum field with a searchable dropdown window.

Support Types

Type
Description

Enum

Any Enum type

Parameters

Parameter Name
Arguments
Description

Height

float

Search menu max height.

ToggleIcons

bool

Use the built-in icons to mark the selected flags, when using flagged enum, keep in mind that icons from [SearchContent] attributes will be ignored.

HideValues

string

Hide specific enum values. Return type of member must be IEnumerable<Enum>.

AllowPaths

bool

Allow using a path as a name?

ShowPathAlways

bool

If you have allowed the use of paths, set true if you want the path to the value to be displayed in the selected value.

FlagSeparator

string

Custom separator symbol for enum flags.

UnityOrder

bool

Unity representation of enum shortcuts position.

ShortcutBits

bool

Automatically add default shortcut bits to select/deselect all flags.

ShortcutShortNames

bool

Use short names for shortcut bits when ShortcutBits is true. If enabled, uses "None" instead of "Nothing" and "All" instead of "Everything".

UseAsFlags

bool

Use this enum field as flags.

ShortNaming

bool

Use the abbreviated name for the selected flags. Keep in mind this option work only with enums which have [System.Flags] attribute.

Examples

using UnityEngine;
using RenownedGames.Apex;

public enum KeyCodeEnum
{
    A, B, C, D, E, F, G // ... many options
}

public class SearchableEnumExample : MonoBehaviour
{
    [SearchableEnum]
    public KeyCodeEnum key;

    [SearchableEnum(Height = 300)]
    public KeyCodeEnum largeMenuKey;
}

Last updated