EditorGUILayout Manual     Reference     Scripting  
Scripting > Editor Classes > EditorGUILayout
EditorGUILayout

Auto-layouted version of EditorGUI

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

Class Functions
LabelField

Make a label field. (Useful for showing read-only info.)

Toggle

Make a toggle.

TextField

Make a text field.

TextArea

Make a text area.

SelectableLabel

Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)

PasswordField

Make a text field where the user can enter a password.

FloatField

Make a text field for entering float values.

IntField

Make a text field for entering integers.

Slider

Make a slider the user can drag to change a value between a min and a max.

IntSlider

Make a slider the user can drag to change an integer value between a min and a max.

MinMaxSlider

Make a special slider the user can use to specify a range between a min and a max.

Popup

Make a generic popup selection field.

EnumPopup

Make an enum popup selection field.

IntPopup

Make an integer popup selection field.

TagField

Make a tag selection field.

LayerField

Make a layer selection field.

MaskField

Make a field for masks.

EnumMaskField

Make a field for enum based masks.

ObjectField

Make an object field. You can assign objects either by drag'n drop objects or by selecting an object using the Object Picker.

Vector2Field

Make an X & Y field for entering a Vector2.

Vector3Field

Make an X, Y & Z field for entering a Vector3.

Vector4Field

Make an X, Y, Z & W field for entering a Vector4.

RectField

Make an X, Y, W & H field for entering a Rect.

BoundsField

Make Center & Extents field for entering a Bounds.

ColorField

Make a field for selecting a Color.

CurveField

Make a field for editing an AnimationCurve.

InspectorTitlebar

Make an inspector-window-like titlebar.

Foldout

Make a label with a foldout arrow to the left of it.

HelpBox

Make a help box with a message to the user.

PrefixLabel

Make a label in front of some control.

Space

Make a small space between the previous control and the following.

BeginToggleGroup

Begin a vertical group with a toggle to enable or disable all the controls within at once.

EndToggleGroup

Close a group started with BeginToggleGroup

BeginHorizontal

Begin a horizontal group and get its rect back.

EndHorizontal

Close a group started with BeginHorizontal

BeginVertical

Begin a vertical group and get its rect back.

EndVertical

Close a group started with BeginVertical

BeginScrollView

Begin an automatically layouted scrollview.

EndScrollView

Ends a scrollview started with a call to BeginScrollView.

PropertyField

Make a field for SerializedProperty.