Class EditorGUIUtility
  
  
  
  
    Inheritance
    
    
    EditorGUIUtility
   
  
  
  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
  
  Properties
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  currentViewWidth
  
  
  Declaration
  
    public static float currentViewWidth { get; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  editingTextField
  
  
  Declaration
  
    public static bool editingTextField { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  fieldWidth
  
  
  Declaration
  
    public static float fieldWidth { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  hierarchyMode
  
  
  Declaration
  
    public static bool hierarchyMode { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  isProSkin
  
  
  Declaration
  
    public static bool isProSkin { get; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  labelWidth
  
  
  Declaration
  
    public static float labelWidth { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  pixelsPerPoint
  
  
  Declaration
  
    public static float pixelsPerPoint { get; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  singleLineHeight
  
  
  Declaration
  
    public static float singleLineHeight { get; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  standardVerticalSpacing
  
  
  Declaration
  
    public static float standardVerticalSpacing { get; }
   
  Property Value
  
  
  
  
  systemCopyBuffer
  
  
  Declaration
  
    public static string systemCopyBuffer { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  textFieldHasSelection
  
  
  Declaration
  
    public static bool textFieldHasSelection { get; }
   
  Property Value
  
  
  
  
  whiteTexture
  
  
  Declaration
  
    public static Texture2D whiteTexture { get; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  wideMode
  
  
  Declaration
  
    public static bool wideMode { get; set; }
   
  Property Value
  
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  AddCursorRect(Rect, MouseCursor)
  
  
  Declaration
  
    public static void AddCursorRect(Rect position, MouseCursor mouse)
   
  Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  AddCursorRect(Rect, MouseCursor, Int32)
  
  
  Declaration
  
    public static void AddCursorRect(Rect position, MouseCursor mouse, int controlID)
   
  Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  CommandEvent(String)
  
  
  Declaration
  
    public static Event CommandEvent(string commandName)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String | commandName |  | 
    
  
  Returns
  
  
    |
    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
  
  
    |
    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
  
  
    |
    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
  
  
    |
    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
  
  
    |
    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
  
  
    |
    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
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  FindTexture(String)
  
  
  Declaration
  
    public static Texture2D FindTexture(string name)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String | name |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  GetBuiltinSkin(EditorSkin)
  
  
  Declaration
  
    public static GUISkin GetBuiltinSkin(EditorSkin skin)
   
  Parameters
  
  Returns
  
  
    |
    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
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  GetIconSize()
  
  
  Declaration
  
    public static Vector2 GetIconSize()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  GetObjectPickerControlID()
  
  
  Declaration
  
    public static int GetObjectPickerControlID()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  GetObjectPickerObject()
  
  
  Declaration
  
    public static Object GetObjectPickerObject()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  HasObjectThumbnail(Type)
  
  
  Declaration
  
    public static bool HasObjectThumbnail(Type objType)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Type | objType |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IconContent(String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent IconContent(string name)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String | name |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IconContent(String, String)
  
  
  Declaration
  
    public static GUIContent IconContent(string name, [DefaultValue("null")] string text)
   
  Parameters
  
  Returns
  
  
  
  
  IsDisplayReferencedByCameras(Int32)
  
  
  Declaration
  
    public static bool IsDisplayReferencedByCameras(int displayIndex)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Int32 | displayIndex |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Load(String)
  
  
  Declaration
  
    public static Object Load(string path)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String | path |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  LoadRequired(String)
  
  
  Declaration
  
    public static Object LoadRequired(string path)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String | path |  | 
    
  
  Returns
  
  
    |
    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
  
  
    |
    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
  
  Returns
  
  
    |
    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
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PixelsToPoints(Vector2)
  
  
  Declaration
  
    public static Vector2 PixelsToPoints(Vector2 position)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Vector2 | position |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PointsToPixels(Rect)
  
  
  Declaration
  
    public static Rect PointsToPixels(Rect rect)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Rect | rect |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PointsToPixels(Vector2)
  
  
  Declaration
  
    public static Vector2 PointsToPixels(Vector2 position)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Vector2 | position |  | 
    
  
  Returns
  
  
  
  
  
  
  
  Declaration
  
    public static void QueueGameViewInputEvent(Event evt)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Event | evt |  | 
    
  
  
  
  
  SerializeMainMenuToString()
  
  
  Declaration
  
    public static string SerializeMainMenuToString()
   
  Returns
  
  
  
  
  SetIconSize(Vector2)
  
  
  Declaration
  
    public static void SetIconSize(Vector2 size)
   
  Parameters
  
  
  
  
  
  
  
  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 Parameters
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrIconContent(String, String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrIconContent(string iconName, string tooltip = null)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrIconContent(Texture, String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrIconContent(Texture icon, string tooltip = null)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTempContent(String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTempContent(string t)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String | t |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTempContent(String[])
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent[] TrTempContent(string[] texts)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | String[] | texts |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTempContent(String[], String[])
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent[] TrTempContent(string[] texts, string[] tooltips)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContent(String, String, String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContent(string text, string tooltip, string iconName)
   
  Parameters
  
  Returns
  
  
    |
    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
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContent(String, String, Texture)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContent(string text, string tooltip = null, Texture icon = null)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContent(String, Texture)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContent(string text, Texture icon)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContentWithIcon(String, String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string iconName)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContentWithIcon(String, String, String)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string tooltip, string iconName)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContentWithIcon(String, String, MessageType)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string tooltip, MessageType messageType)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContentWithIcon(String, String, Texture)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, string tooltip, Texture icon)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContentWithIcon(String, MessageType)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, MessageType messageType)
   
  Parameters
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrTextContentWithIcon(String, Texture)
  
  
  Declaration
  
    [ExcludeFromDocs]
public static GUIContent TrTextContentWithIcon(string text, Texture icon)
   
  Parameters
  
  Returns
  
  Extension Methods