GUILayout Manual     Reference     Scripting  
Scripting > Runtime Classes > GUILayout
GUILayout

The GUILayout class is the interface for Unity gui with automatic layout.


See Also: GUI Layout tutorial

Class Functions
Label

Make an auto-layout label.

Box

Make an auto-layout box.

Button

Make a single press button. The user clicks them and something happens immediately.

RepeatButton

Make a repeating button. The button returns true as long as the user holds down the mouse

TextField

Make a single-line text field where the user can edit a string.

PasswordField

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

TextArea

Make a multi-line text field where the user can edit a string.

Toggle

Make an on/off toggle button.

Toolbar

Make a toolbar

SelectionGrid

Make a Selection Grid

HorizontalSlider

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

VerticalSlider

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

HorizontalScrollbar

Make a horiztonal scrollbar.

VerticalScrollbar

Make a vertical scrollbar.

Space

Insert a space in the current layout group.

FlexibleSpace

Insert a flexible space element.

BeginHorizontal

Begin a Horizontal control group.

EndHorizontal

Close a group started with BeginHorizontal

BeginVertical

Begin a vertical control group.

EndVertical

Close a group started with BeginVertical

BeginArea

Begin a GUILayout block of GUI controls in a fixed screen area.

EndArea

Close a GUILayout block started with BeginArea

BeginScrollView

Begin an automatically laid out scrollview.

EndScrollView

End a scroll view begun with a call to BeginScrollView.

Window

Make a popup window that layouts its contents automatically.

Width

Option passed to a control to give it an absolute width.

MinWidth

Option passed to a control to specify a minimum width.

MaxWidth

Option passed to a control to specify a maximum width.

Height

Option passed to a control to give it an absolute height.

MinHeight

Option passed to a control to specify a minimum height.

MaxHeight

Option passed to a control to specify a maximum height.

ExpandWidth

Option passed to a control to allow or disallow horizontal expansion.

ExpandHeight

Option passed to a control to allow or disallow vertical expansion.