GUI
class in UnityEngine · UnityEngine.IMGUIModule
Unity's immediate-mode GUI, for OnGUI: controls at explicit rects (in the current group's pixels, y down), drawn with the skin's styles. Controls react to this frame's mouse and keyboard events and return their new values; drawing happens in the Repaint pass.
Properties 9
static Color backgroundColor { get; set; }static bool changed { get; set; }static Color color { get; set; }static Color contentColor { get; set; }static int depth { get; set; }static bool enabled { get; set; }static Matrix4x4 matrix { get; set; }static GUISkin skin { get; set; }static string tooltip { get; set; }Methods 35
static void BeginClip(Rect position)static void BeginClip(Rect position, Vector2 scrollOffset, Vector2 renderOffset, bool resetOffset)static void BeginGroup(Rect position)static void BeginGroup(Rect position, string text)static void BeginGroup(Rect position, Texture image)static void BeginGroup(Rect position, GUIContent content)static void BeginGroup(Rect position, GUIStyle style)static void BeginGroup(Rect position, string text, GUIStyle style)static void BeginGroup(Rect position, Texture image, GUIStyle style)static void BeginGroup(Rect position, GUIContent content, GUIStyle style)Later controls are placed relative to the group and clipped to it.
static Vector2 BeginScrollView(Rect position, Vector2 scrollPosition, Rect viewRect)static Vector2 BeginScrollView(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical)static Vector2 BeginScrollView(Rect position, Vector2 scrollPosition, Rect viewRect, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar)static Vector2 BeginScrollView(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar)static Vector2 BeginScrollView(Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background)A view of viewRect through position, with scrollbars where it doesn't fit; the wheel scrolls it.
static void Box(Rect position, string text)static void Box(Rect position, Texture image)static void Box(Rect position, GUIContent content)static void Box(Rect position, string text, GUIStyle style)static void Box(Rect position, Texture image, GUIStyle style)static void Box(Rect position, GUIContent content, GUIStyle style)static void BringWindowToBack(int windowID)static void BringWindowToFront(int windowID)static bool Button(Rect position, string text)static bool Button(Rect position, Texture image)static bool Button(Rect position, GUIContent content)static bool Button(Rect position, string text, GUIStyle style)static bool Button(Rect position, Texture image, GUIStyle style)static bool Button(Rect position, GUIContent content, GUIStyle style)True on the mouse-up that ends a click begun on the button.
static void DragWindow()static void DragWindow(Rect position)Dragging inside position (window space) moves the window.
static void DrawTexture(Rect position, Texture image)static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode)static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend)static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect)static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, float borderWidth, float borderRadius)static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, Vector4 borderWidths, float borderRadius)static void DrawTexture(Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect, Color color, Vector4 borderWidths, Vector4 borderRadiuses)A texture in a rect, scaled by scaleMode (borders and rounded corners aren't drawn).
static void DrawTextureWithTexCoords(Rect position, Texture image, Rect texCoords)static void DrawTextureWithTexCoords(Rect position, Texture image, Rect texCoords, bool alphaBlend)static void EndClip()static void EndGroup()static void EndScrollView()static void EndScrollView(bool handleScrollWheel)static void FocusControl(string name)static void FocusWindow(int windowID)static string GetNameOfFocusedControl()static float HorizontalScrollbar(Rect position, float value, float size, float leftValue, float rightValue)static float HorizontalScrollbar(Rect position, float value, float size, float leftValue, float rightValue, GUIStyle style)static float HorizontalSlider(Rect position, float value, float leftValue, float rightValue)static float HorizontalSlider(Rect position, float value, float leftValue, float rightValue, GUIStyle slider, GUIStyle thumb)static void Label(Rect position, string text)static void Label(Rect position, Texture image)static void Label(Rect position, GUIContent content)static void Label(Rect position, string text, GUIStyle style)static void Label(Rect position, Texture image, GUIStyle style)static void Label(Rect position, GUIContent content, GUIStyle style)static Rect ModalWindow(int id, Rect clientRect, WindowFunction func, string text)static Rect ModalWindow(int id, Rect clientRect, WindowFunction func, GUIContent content)static Rect ModalWindow(int id, Rect clientRect, WindowFunction func, string text, GUIStyle style)static Rect ModalWindow(int id, Rect clientRect, WindowFunction func, GUIContent content, GUIStyle style)static string PasswordField(Rect position, string password, char maskChar)static string PasswordField(Rect position, string password, char maskChar, int maxLength)static string PasswordField(Rect position, string password, char maskChar, GUIStyle style)static string PasswordField(Rect position, string password, char maskChar, int maxLength, GUIStyle style)static bool RepeatButton(Rect position, string text)static bool RepeatButton(Rect position, Texture image)static bool RepeatButton(Rect position, GUIContent content)static bool RepeatButton(Rect position, string text, GUIStyle style)static bool RepeatButton(Rect position, Texture image, GUIStyle style)static bool RepeatButton(Rect position, GUIContent content, GUIStyle style)True in every Repaint while the button is held down with the mouse over it.
static void ScrollTo(Rect position)static bool ScrollTowards(Rect position, float maxDelta)static int SelectionGrid(Rect position, int selected, string[] texts, int xCount)static int SelectionGrid(Rect position, int selected, Texture[] images, int xCount)static int SelectionGrid(Rect position, int selected, GUIContent[] content, int xCount)static int SelectionGrid(Rect position, int selected, string[] texts, int xCount, GUIStyle style)static int SelectionGrid(Rect position, int selected, Texture[] images, int xCount, GUIStyle style)static int SelectionGrid(Rect position, int selected, GUIContent[] contents, int xCount, GUIStyle style)Buttons in rows of xCount; the one clicked becomes selected.
static void SetNextControlName(string name)static float Slider(Rect position, float value, float size, float start, float end, GUIStyle slider, GUIStyle thumb, bool horiz, int id)static string TextArea(Rect position, string text)static string TextArea(Rect position, string text, int maxLength)static string TextArea(Rect position, string text, GUIStyle style)static string TextArea(Rect position, string text, int maxLength, GUIStyle style)static string TextField(Rect position, string text)static string TextField(Rect position, string text, int maxLength)static string TextField(Rect position, string text, GUIStyle style)static string TextField(Rect position, string text, int maxLength, GUIStyle style)static bool Toggle(Rect position, bool value, string text)static bool Toggle(Rect position, bool value, Texture image)static bool Toggle(Rect position, bool value, GUIContent content)static bool Toggle(Rect position, bool value, string text, GUIStyle style)static bool Toggle(Rect position, bool value, Texture image, GUIStyle style)static bool Toggle(Rect position, bool value, GUIContent content, GUIStyle style)static bool Toggle(Rect position, int id, bool value, GUIContent content, GUIStyle style)static int Toolbar(Rect position, int selected, string[] texts)static int Toolbar(Rect position, int selected, Texture[] images)static int Toolbar(Rect position, int selected, GUIContent[] contents)static int Toolbar(Rect position, int selected, string[] texts, GUIStyle style)static int Toolbar(Rect position, int selected, Texture[] images, GUIStyle style)static int Toolbar(Rect position, int selected, GUIContent[] contents, GUIStyle style)static void UnfocusWindow()static float VerticalScrollbar(Rect position, float value, float size, float topValue, float bottomValue)static float VerticalScrollbar(Rect position, float value, float size, float topValue, float bottomValue, GUIStyle style)static float VerticalSlider(Rect position, float value, float topValue, float bottomValue)static float VerticalSlider(Rect position, float value, float topValue, float bottomValue, GUIStyle slider, GUIStyle thumb)static Rect Window(int id, Rect clientRect, WindowFunction func, string text)static Rect Window(int id, Rect clientRect, WindowFunction func, Texture image)static Rect Window(int id, Rect clientRect, WindowFunction func, GUIContent content)static Rect Window(int id, Rect clientRect, WindowFunction func, string text, GUIStyle style)static Rect Window(int id, Rect clientRect, WindowFunction func, Texture image, GUIStyle style)static Rect Window(int id, Rect clientRect, WindowFunction func, GUIContent title, GUIStyle style)A window: its frame and title, then func inside it. Drawn where it's called (Unity draws windows after the rest of OnGUI); GUI.DragWindow moves it.
Not in Tassix yet 3
DoBeginScrollView mouseTooltip tooltipRect