Show / Hide Table of Contents

Class EditorGUIUtility

Inheritance
Object
GUIUtility
EditorGUIUtility
Inherited Members
GUIUtility.hasModalWindow
GUIUtility.GetControlID(Int32, FocusType, Rect)
GUIUtility.AlignRectToDevice(Rect, Int32, Int32)
GUIUtility.GetControlID(FocusType)
GUIUtility.GetControlID(GUIContent, FocusType)
GUIUtility.GetControlID(FocusType, Rect)
GUIUtility.GetControlID(GUIContent, FocusType, Rect)
GUIUtility.GetControlID(Int32, FocusType)
GUIUtility.GetStateObject(Type, Int32)
GUIUtility.QueryStateObject(Type, Int32)
GUIUtility.hotControl
GUIUtility.keyboardControl
GUIUtility.ExitGUI()
GUIUtility.GUIToScreenPoint(Vector2)
GUIUtility.ScreenToGUIPoint(Vector2)
GUIUtility.ScreenToGUIRect(Rect)
GUIUtility.RotateAroundPivot(Single, Vector2)
GUIUtility.ScaleAroundPivot(Vector2, Vector2)
GUIUtility.AlignRectToDevice(Rect)
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEditor
Assembly: UnityEditor.dll
Syntax
public sealed class EditorGUIUtility : GUIUtility

Fields

| Improve this Doc View Source

native

Declaration
[Obsolete("This field is no longer used by any builtin controls. If passing this field to GetControlID, explicitly use the FocusType enum instead.", false)]
public static FocusType native
Field Value
Type Description
FocusType

Properties

| Improve this Doc View Source

currentViewWidth

Declaration
public static float currentViewWidth { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

editingTextField

Declaration
public static bool editingTextField { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

fieldWidth

Declaration
public static float fieldWidth { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

hierarchyMode

Declaration
public static bool hierarchyMode { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isProSkin

Declaration
public static bool isProSkin { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

labelWidth

Declaration
public static float labelWidth { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

pixelsPerPoint

Declaration
public static float pixelsPerPoint { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

singleLineHeight

Declaration
public static float singleLineHeight { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

standardVerticalSpacing

Declaration
public static float standardVerticalSpacing { get; }
Property Value
Type Description
Single

systemCopyBuffer

Declaration
public static string systemCopyBuffer { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

textFieldHasSelection

Declaration
public static bool textFieldHasSelection { get; }
Property Value
Type Description
Boolean

whiteTexture

Declaration
public static Texture2D whiteTexture { get; }
Property Value
Type Description
Texture2D
| Improve this Doc View Source

wideMode

Declaration
public static bool wideMode { get; set; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AddCursorRect(Rect, MouseCursor)

Declaration
public static void AddCursorRect(Rect position, MouseCursor mouse)
Parameters
Type Name Description
Rect position
MouseCursor mouse
| Improve this Doc View Source

AddCursorRect(Rect, MouseCursor, Int32)

Declaration
public static void AddCursorRect(Rect position, MouseCursor mouse, int controlID)
Parameters
Type Name Description
Rect position
MouseCursor mouse
Int32 controlID
| Improve this Doc View Source

CommandEvent(String)

Declaration
public static Event CommandEvent(string commandName)
Parameters
Type Name Description
String commandName
Returns
Type Description
Event
| Improve this Doc View Source

DrawColorSwatch(Rect, Color)

Declaration
public static void DrawColorSwatch(Rect position, Color color)
Parameters
Type Name Description
Rect position
Color color
| Improve this Doc View Source

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color)

Declaration
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor)
Parameters
Type Name Description
Rect position
AnimationCurve curve
SerializedProperty property
Color color
Color bgColor
| Improve this Doc View Source

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Color, Color)

Declaration
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Color topFillColor, Color bottomFillColor)
Parameters
Type Name Description
Rect position
AnimationCurve curve
SerializedProperty property
Color color
Color bgColor
Color topFillColor
Color bottomFillColor
| Improve this Doc View Source

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Color, Color, Rect)

Declaration
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Color topFillColor, Color bottomFillColor, Rect curveRanges)
Parameters
Type Name Description
Rect position
AnimationCurve curve
SerializedProperty property
Color color
Color bgColor
Color topFillColor
Color bottomFillColor
Rect curveRanges
| Improve this Doc View Source

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Rect)

Declaration
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Rect curveRanges)
Parameters
Type Name Description
Rect position
AnimationCurve curve
SerializedProperty property
Color color
Color bgColor
Rect curveRanges
| Improve this Doc View Source

DrawRegionSwatch(Rect, SerializedProperty, SerializedProperty, Color, Color, Rect)

Declaration
public static void DrawRegionSwatch(Rect position, SerializedProperty property, SerializedProperty property2, Color color, Color bgColor, Rect curveRanges)
Parameters
Type Name Description
Rect position
SerializedProperty property
SerializedProperty property2
Color color
Color bgColor
Rect curveRanges
| Improve this Doc View Source

DrawRegionSwatch(Rect, AnimationCurve, AnimationCurve, Color, Color, Rect)

Declaration
public static void DrawRegionSwatch(Rect position, AnimationCurve curve, AnimationCurve curve2, Color color, Color bgColor, Rect curveRanges)
Parameters
Type Name Description
Rect position
AnimationCurve curve
AnimationCurve curve2
Color color
Color bgColor
Rect curveRanges
| Improve this Doc View Source

FindTexture(String)

Declaration
public static Texture2D FindTexture(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Texture2D
| Improve this Doc View Source

GetBuiltinSkin(EditorSkin)

Declaration
public static GUISkin GetBuiltinSkin(EditorSkin skin)
Parameters
Type Name Description
EditorSkin skin
Returns
Type Description
GUISkin
| Improve this Doc View Source

GetFlowLayoutedRects(Rect, GUIStyle, Single, Single, List<String>)

Declaration
public static List<Rect> GetFlowLayoutedRects(Rect rect, GUIStyle style, float horizontalSpacing, float verticalSpacing, List<string> items)
Parameters
Type Name Description
Rect rect
GUIStyle style
Single horizontalSpacing
Single verticalSpacing
List<String> items
Returns
Type Description
List<Rect>
| Improve this Doc View Source

GetIconSize()

Declaration
public static Vector2 GetIconSize()
Returns
Type Description
Vector2
| Improve this Doc View Source

GetObjectPickerControlID()

Declaration
public static int GetObjectPickerControlID()
Returns
Type Description
Int32
| Improve this Doc View Source

GetObjectPickerObject()

Declaration
public static Object GetObjectPickerObject()
Returns
Type Description
Object
| Improve this Doc View Source

HasObjectThumbnail(Type)

Declaration
public static bool HasObjectThumbnail(Type objType)
Parameters
Type Name Description
Type objType
Returns
Type Description
Boolean
| Improve this Doc View Source

IconContent(String)

Declaration
[ExcludeFromDocs]
public static GUIContent IconContent(string name)
Parameters
Type Name Description
String name
Returns
Type Description
GUIContent
| Improve this Doc View Source

IconContent(String, String)

Declaration
public static GUIContent IconContent(string name, [DefaultValue("null")] string text)
Parameters
Type Name Description
String name
String text
Returns
Type Description
GUIContent

IsDisplayReferencedByCameras(Int32)

Declaration
public static bool IsDisplayReferencedByCameras(int displayIndex)
Parameters
Type Name Description
Int32 displayIndex
Returns
Type Description
Boolean
| Improve this Doc View Source

Load(String)

Declaration
public static Object Load(string path)
Parameters
Type Name Description
String path
Returns
Type Description
Object
| Improve this Doc View Source

LoadRequired(String)

Declaration
public static Object LoadRequired(string path)
Parameters
Type Name Description
String path
Returns
Type Description
Object
| Improve this Doc View Source

LookLikeControls()

Declaration
[ExcludeFromDocs]
[Obsolete("LookLikeControls and LookLikeInspector modes are deprecated.Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.", false)]
public static void LookLikeControls()
| Improve this Doc View Source

LookLikeControls(Single)

Declaration
[ExcludeFromDocs]
[Obsolete("LookLikeControls and LookLikeInspector modes are deprecated.Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.", false)]
public static void LookLikeControls(float _labelWidth)
Parameters
Type Name Description
Single _labelWidth
| Improve this Doc View Source

LookLikeControls(Single, Single)

Declaration
[Obsolete("LookLikeControls and LookLikeInspector modes are deprecated.Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.", false)]
public static void LookLikeControls(float _labelWidth, float _fieldWidth)
Parameters
Type Name Description
Single _labelWidth
Single _fieldWidth
| Improve this Doc View Source

LookLikeInspector()

Declaration
[Obsolete("LookLikeControls and LookLikeInspector modes are deprecated.", false)]
public static void LookLikeInspector()
| Improve this Doc View Source

ObjectContent(Object, Type)

Declaration
public static GUIContent ObjectContent(Object obj, Type type)
Parameters
Type Name Description
Object obj
Type type
Returns
Type Description
GUIContent
| Improve this Doc View Source

PingObject(Int32)

Declaration
public static void PingObject(int targetInstanceID)
Parameters
Type Name Description
Int32 targetInstanceID
| Improve this Doc View Source

PingObject(Object)

Declaration
public static void PingObject(Object obj)
Parameters
Type Name Description
Object obj
| Improve this Doc View Source

PixelsToPoints(Rect)

Declaration
public static Rect PixelsToPoints(Rect rect)
Parameters
Type Name Description
Rect rect
Returns
Type Description
Rect
| Improve this Doc View Source

PixelsToPoints(Vector2)

Declaration
public static Vector2 PixelsToPoints(Vector2 position)
Parameters
Type Name Description
Vector2 position
Returns
Type Description
Vector2
| Improve this Doc View Source

PointsToPixels(Rect)

Declaration
public static Rect PointsToPixels(Rect rect)
Parameters
Type Name Description
Rect rect
Returns
Type Description
Rect
| Improve this Doc View Source

PointsToPixels(Vector2)

Declaration
public static Vector2 PointsToPixels(Vector2 position)
Parameters
Type Name Description
Vector2 position
Returns
Type Description
Vector2

QueueGameViewInputEvent(Event)

Declaration
public static void QueueGameViewInputEvent(Event evt)
Parameters
Type Name Description
Event evt

SerializeMainMenuToString()

Declaration
public static string SerializeMainMenuToString()
Returns
Type Description
String

SetIconSize(Vector2)

Declaration
public static void SetIconSize(Vector2 size)
Parameters
Type Name Description
Vector2 size

SetMenuLocalizationTestMode(Boolean)

Declaration
public static void SetMenuLocalizationTestMode(bool onoff)
Parameters
Type Name Description
Boolean onoff

SetWantsMouseJumping(Int32)

Declaration
public static void SetWantsMouseJumping(int wantz)
Parameters
Type Name Description
Int32 wantz
| Improve this Doc View Source

ShowObjectPicker<T>(Object, Boolean, String, Int32)

Declaration
public static void ShowObjectPicker<T>(Object obj, bool allowSceneObjects, string searchFilter, int controlID)
    where T : Object
Parameters
Type Name Description
Object obj
Boolean allowSceneObjects
String searchFilter
Int32 controlID
Type Parameters
Name Description
T
| Improve this Doc View Source

TrIconContent(String, String)

Declaration
[ExcludeFromDocs]
public static GUIContent TrIconContent(string iconName, string tooltip = null)
Parameters
Type Name Description
String iconName
String tooltip
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrIconContent(Texture, String)

Declaration
[ExcludeFromDocs]
public static GUIContent TrIconContent(Texture icon, string tooltip = null)
Parameters
Type Name Description
Texture icon
String tooltip
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTempContent(String)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTempContent(string t)
Parameters
Type Name Description
String t
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTempContent(String[])

Declaration
[ExcludeFromDocs]
public static GUIContent[] TrTempContent(string[] texts)
Parameters
Type Name Description
String[] texts
Returns
Type Description
GUIContent[]
| Improve this Doc View Source

TrTempContent(String[], String[])

Declaration
[ExcludeFromDocs]
public static GUIContent[] TrTempContent(string[] texts, string[] tooltips)
Parameters
Type Name Description
String[] texts
String[] tooltips
Returns
Type Description
GUIContent[]
| Improve this Doc View Source

TrTextContent(String, String, String)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContent(string text, string tooltip, string iconName)
Parameters
Type Name Description
String text
String tooltip
String iconName
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContent(String, String, String, Texture)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContent(string key, string text, string tooltip, Texture icon)
Parameters
Type Name Description
String key
String text
String tooltip
Texture icon
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContent(String, String, Texture)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContent(string text, string tooltip = null, Texture icon = null)
Parameters
Type Name Description
String text
String tooltip
Texture icon
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContent(String, Texture)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContent(string text, Texture icon)
Parameters
Type Name Description
String text
Texture icon
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContentWithIcon(String, String)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string iconName)
Parameters
Type Name Description
String text
String iconName
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContentWithIcon(String, String, String)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string tooltip, string iconName)
Parameters
Type Name Description
String text
String tooltip
String iconName
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContentWithIcon(String, String, MessageType)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string tooltip, MessageType messageType)
Parameters
Type Name Description
String text
String tooltip
MessageType messageType
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContentWithIcon(String, String, Texture)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string tooltip, Texture icon)
Parameters
Type Name Description
String text
String tooltip
Texture icon
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContentWithIcon(String, MessageType)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, MessageType messageType)
Parameters
Type Name Description
String text
MessageType messageType
Returns
Type Description
GUIContent
| Improve this Doc View Source

TrTextContentWithIcon(String, Texture)

Declaration
[ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, Texture icon)
Parameters
Type Name Description
String text
Texture icon
Returns
Type Description
GUIContent

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX