Game Development Reference
In-Depth Information
DisplayToggle =
EditorGUILayout.Toggle("Display Toggle",
DisplayToggle);
Offset = EditorGUILayout.Slider("Offset Slider",
Offset, -3, 3);
EditorGUILayout.EndToggleGroup();
}
The preceding example will show the following menu window:
When you put GUI elements together in an editor window, you can use either the basic
EditorGUI
controls or the more advanced
EditorGUILayout
controls, which im-
plement some additional automatic layout features on top of the basic controls.
Tip
For more details on the controls available with
EditorGUILayout
, check out the Unity
out.html
.
For more information on editor windows, see the Unity reference guide at
ht-