Class EditorGUIExtensions
Extensions methods for Unity Editor GUI
Inheritance
System.Object
EditorGUIExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public static class EditorGUIExtensions
Fields
BYTE_TO_FLOAT
Declaration
public const float BYTE_TO_FLOAT = 998277248F
Field Value
Type |
Description |
System.Single |
|
EditorColorBasic
Declaration
public static readonly Color EditorColorBasic
Field Value
EditorColorBasicLight
Declaration
public static readonly Color EditorColorBasicLight
Field Value
EditorColorPro
Declaration
public static readonly Color EditorColorPro
Field Value
EditorColorProLight
Declaration
public static readonly Color EditorColorProLight
Field Value
Properties
EditorColor
Declaration
public static Color EditorColor { get; }
Property Value
EditorColorLight
Declaration
public static Color EditorColorLight { get; }
Property Value
RichTextStyle
Declaration
public static GUIStyle RichTextStyle { get; }
Property Value
Type |
Description |
GUIStyle |
|
Methods
DrawButton(Rect, Texture2D)
Declaration
public static bool DrawButton(Rect rect, Texture2D texture)
Parameters
Type |
Name |
Description |
Rect |
rect |
|
Texture2D |
texture |
|
Returns
Type |
Description |
System.Boolean |
|
DrawCategory(ColoredTheme, String, Action, String)
Declaration
public static bool DrawCategory(ColoredTheme style, string category, Action action, string tooltip)
Parameters
Type |
Name |
Description |
ColoredTheme |
style |
|
System.String |
category |
|
System.Action |
action |
|
System.String |
tooltip |
|
Returns
Type |
Description |
System.Boolean |
|
DrawCategory(ColoredTheme, String, Boolean, Action, String, Boolean)
Declaration
public static bool DrawCategory(ColoredTheme style, string category, bool isOpenable, Action action, string tooltip, bool isOpen = true)
Parameters
Type |
Name |
Description |
ColoredTheme |
style |
|
System.String |
category |
|
System.Boolean |
isOpenable |
|
System.Action |
action |
|
System.String |
tooltip |
|
System.Boolean |
isOpen |
|
Returns
Type |
Description |
System.Boolean |
|
DrawDragButton(Rect, Texture2D)
Declaration
public static bool DrawDragButton(Rect rect, Texture2D texture)
Parameters
Type |
Name |
Description |
Rect |
rect |
|
Texture2D |
texture |
|
Returns
Type |
Description |
System.Boolean |
|
DrawGUIAuto<T>(Object, GUIContent)
Declaration
public static object DrawGUIAuto<T>(this object value, GUIContent guiContent)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
GUIContent |
guiContent |
|
Returns
Type |
Description |
System.Object |
|
Type Parameters
DrawHyperlink(String, String, Boolean, Boolean)
Draws an hyperlink that opens the link in the default browser.
Declaration
public static void DrawHyperlink(string label, string link, bool bold = false, bool centered = false)
Parameters
Type |
Name |
Description |
System.String |
label |
|
System.String |
link |
|
System.Boolean |
bold |
|
System.Boolean |
centered |
|
DrawLine(Single)
Declaration
public static void DrawLine(float height = 1F)
Parameters
Type |
Name |
Description |
System.Single |
height |
|
DrawLine(Single, Color)
Declaration
public static void DrawLine(float height, Color color)
Parameters
Type |
Name |
Description |
System.Single |
height |
|
Color |
color |
|
DrawSubCategory(ColoredTheme, String, Action, String)
Declaration
public static Rect DrawSubCategory(ColoredTheme style, string category, Action action, string tooltip)
Parameters
Type |
Name |
Description |
ColoredTheme |
style |
|
System.String |
category |
|
System.Action |
action |
|
System.String |
tooltip |
|
Returns
GetUnityColor(ColorType)
Returns the editor Color depending on the Pro/Free version the user has.
Declaration
public static Color GetUnityColor(ColorType type)
Parameters
Returns
GUIDrawRect(Rect, Color, Color, Int32, String, TextAnchor)
Declaration
public static void GUIDrawRect(Rect position, Color color, Color borderColor, int borderThickness = 0, string text = "", TextAnchor rectTextAnchor = null)
Parameters
Type |
Name |
Description |
Rect |
position |
|
Color |
color |
|
Color |
borderColor |
|
System.Int32 |
borderThickness |
|
System.String |
text |
|
TextAnchor |
rectTextAnchor |
|
GUIDrawRect(Rect, Color, Int32, String)
Declaration
public static void GUIDrawRect(Rect position, Color color, int borderThickness = 0, string title = "")
Parameters
Type |
Name |
Description |
Rect |
position |
|
Color |
color |
|
System.Int32 |
borderThickness |
|
System.String |
title |
|
SetHiResBackground(GUIStyleState, String, Color)
Declaration
public static void SetHiResBackground(this GUIStyleState guiStateStyle, string textureName, Color tint)
Parameters
Type |
Name |
Description |
GUIStyleState |
guiStateStyle |
|
System.String |
textureName |
|
Color |
tint |
|
ToColor(Int32)
Converts an int to a color (bit shifting).
Declaration
public static Color ToColor(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
ToInt32(Color)
Converts a color to an int32 (bit shifting).
Declaration
public static int ToInt32(this Color color)
Parameters
Type |
Name |
Description |
Color |
color |
|
Returns
Type |
Description |
System.Int32 |
|