EditorGUI.EnumPopup Manual     Reference     Scripting  
Scripting > Editor Classes > EditorGUI
EditorGUI.EnumPopup

static function EnumPopup (position : Rect, selected : System.Enum, style : GUIStyle = EditorStyles.popup) : System.Enum

static function EnumPopup (position : Rect, label : string, selected : System.Enum, style : GUIStyle = EditorStyles.popup) : System.Enum

static function EnumPopup (position : Rect, label : GUIContent, selected : System.Enum, style : GUIStyle = EditorStyles.popup) : System.Enum

Parameters

NameDescription
position Rectangle on the screen to use for the field.
label Optional label in front of the field.
selected The enum option the field shows.
style Optional GUIStyle.

Returns

System.Enum - The enum option that has been selected by the user.

Description

Make an enum popup selection field.

Takes the currently selected enum value as a parameter and returns the enum value selected by the user.