EditorGUI Class  

Scripting > Editor Classes > EditorGUI

Class for editor-only GUI. This class contains general purpose 2D additions to UnityGUI.

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.

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

Class Functions
TextField

Make a text field

FloatField

Make a text field for entering floats.

IntField

Make a labelled integer field

Slider

Make a labelled Slider.

Popup

Make a popup button.

ObjectField

Make a object drop slot.

Vector2Field

Make an X & Y field for a Vector2.

Vector3Field

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

RectField

Make all fields for editing rects.

Toggle

Make a labelled Toggle button