EditorGUI

These work pretty much like the normal GUI functions - and also have matching implementations in EditorGUILayout

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 Variables
showMixedValue

Makes the following controls give the appearance of editing multiple different values.

actionKey

Is the platform-dependent "action" modifier key held down? (Read Only)

indentLevel

The indent level of the field labels.

Class Functions
BeginDisabledGroup

Create a group of controls that can be disabled.

EndDisabledGroup

Ends a disabled group started with BeginDisabledGroup.

BeginChangeCheck

Check if any control was changed inside a block of code.

EndChangeCheck

Ends a change check started with BeginChangeCheck ().

DropShadowLabel

Draws a label with a drop shadow.

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 floats.

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 and 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.

ProgressBar

Make a progress bar.

HelpBox

Make a help box with a message to the user.

PrefixLabel

Make a label in front of some control.

BeginProperty

Create a Property wrapper, useful for making regular GUI controls work with SerializedProperty.

EndProperty

Ends a Property wrapper started with BeginProperty.

DrawTextureAlpha

Draws the alpha channel of a texture within a rectangle.

DrawPreviewTexture

Draws the texture within a rectangle.

GetPropertyHeight

Get the height needed for a PropertyField control.

PropertyField

Make a field for SerializedProperty.