GUI Manual     Reference     Scripting  
Scripting > Runtime Classes > GUI
GUI

The GUI class is the interface for Unity's GUI with manual positioning.


See Also: GUI tutorial

Class Variables
skin

The global skin to use.

color

Global tinting color for the GUI.

backgroundColor

Global tinting color for all background elements rendered by the GUI.

contentColor

Tinting color for all text rendered by the GUI.

changed

Returns true if any controls changed the value of the input data.

enabled

Is the GUI enabled?

matrix

The GUI transform matrix.

tooltip

The tooltip of the control the mouse is currently over, or which has keyboard focus. (Read Only).

depth

The sorting depth of the currently executing GUI behaviour.

Class Functions
Label

Make a text or texture label on screen.

DrawTexture

Draw a texture within a rectangle.

DrawTextureWithTexCoords

Draw a texture within a rectangle with the given texture coordinates. Use this function for clipping or tiling the image within the given rectangle.

Box

Make a graphical box.

Button

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

RepeatButton

Make a button that is active as long as the user holds it down.

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 area where the user can edit a string.

SetNextControlName

Set the name of the next control.

GetNameOfFocusedControl

Get the name of named control that has focus.

FocusControl

Move keyboard focus to a named control.

Toggle

Make an on/off toggle button.

Toolbar

Make a toolbar

SelectionGrid

Make a grid of buttons.

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 horizontal scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.

VerticalScrollbar

Make a vertiical scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.

BeginGroup

Begin a group. Must be matched with a call to EndGroup.

EndGroup

End a group.

BeginScrollView

Begin a scrolling view inside your GUI.

EndScrollView

Ends a scrollview started with a call to BeginScrollView.

ScrollTo

Scrolls all enclosing scrollviews so they try to make position visible.

Window

Make a popup window.

DragWindow

Make a window draggable.

BringWindowToFront

Bring a specific window to front of the floating windows.

BringWindowToBack

Bring a specific window to back of the floating windows.

FocusWindow

Make a window become the active window.

UnfocusWindow

Remove focus from all windows.

Delegates
WindowFunction