Class EditorGUIUtils
Collection of Editor GUI Utility methods.
Inherited Members
Namespace: UnityEditor.MARS
Assembly: Unity.MARS.Editor.dll
Syntax
[MovedFrom("Unity.MARS")]
public static class EditorGUIUtils
Methods
FindSerializedPropertyData(SerializedObject, string)
Collect all the data associated to a SerializedProperty
on a SerializedObject
to use the
SerializedPropertyData
in the GUI
Declaration
public static SerializedPropertyData FindSerializedPropertyData(this SerializedObject serializedObject, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
SerializedObject | serializedObject | serialized object in an inspector |
string | propertyName | Find serialized property by name. |
Returns
Type | Description |
---|---|
SerializedPropertyData | Collected data for drawing gui with |
FindSerializedPropertyData(SerializedProperty)
Collect all the data associated to a SerializedProperty
on a SerializedObject
to use the
SerializedPropertyData
in the GUI
Declaration
public static SerializedPropertyData FindSerializedPropertyData(SerializedProperty property)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property |
|
Returns
Type | Description |
---|---|
SerializedPropertyData | Collected data for drawing gui with |
GetContent(string)
Get a GUIContent from input string, with text and tooltip separated by a | pipe character
Declaration
public static GUIContent GetContent(string textAndTooltip)
Parameters
Type | Name | Description |
---|---|---|
string | textAndTooltip | Combined text and tooltip string, separated by a | pipe character |
Returns
Type | Description |
---|---|
GUIContent | The resulting GUIContent |
PropertyField(SerializedPropertyData)
Draw a property field, with no checkbox
Declaration
public static void PropertyField(SerializedPropertyData property)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | property | The property being drawn |
PropertyField(SerializedPropertyData, bool, bool)
Draw a property field, with no checkbox
Declaration
public static void PropertyField(SerializedPropertyData property, bool onlyHideToggle, bool showHideInInspector)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | property | The property being drawn |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |
PropertyField(SerializedPropertyData, SerializedPropertyData)
Draw a property field, with checkbox if appropriate
Declaration
public static void PropertyField(SerializedPropertyData toggleProperty, SerializedPropertyData property)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
PropertyField(SerializedPropertyData, SerializedPropertyData, bool, bool, Color?)
Draw a property field, with checkbox if appropriate
Declaration
public static void PropertyField(SerializedPropertyData toggleProperty, SerializedPropertyData property, bool onlyHideToggle, bool showHideInInspector, Color? overrideColor)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |
Color? | overrideColor | The color to use, or null for no override |
PropertyField(SerializedPropertyData, SerializedPropertyData, Color?)
Draw a property field, with checkbox if appropriate
Declaration
public static void PropertyField(SerializedPropertyData toggleProperty, SerializedPropertyData property, Color? overrideColor)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
Color? | overrideColor | The color to use, or null for no override |
PropertyField(SerializedPropertyData, SerializedPropertyData, string)
Draw a property field, with checkbox if appropriate
Declaration
public static void PropertyField(SerializedPropertyData toggleProperty, SerializedPropertyData property, string title)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
string | title | The label to display for this property |
PropertyField(SerializedPropertyData, SerializedPropertyData, string, bool, bool)
Draw a property field, with checkbox if appropriate
Declaration
public static void PropertyField(SerializedPropertyData toggleProperty, SerializedPropertyData property, string title, bool onlyHideToggle, bool showHideInInspector)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
string | title | The label to display for this property |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |
PropertyField(SerializedPropertyData, SerializedPropertyData, GUIContent, bool, bool)
Draw a property field, with checkbox if appropriate
Declaration
public static void PropertyField(SerializedPropertyData toggleProperty, SerializedPropertyData property, GUIContent title, bool onlyHideToggle, bool showHideInInspector)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
GUIContent | title | The label to display for this property |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |
PropertyField(SerializedPropertyData, GUIContent, bool)
Draw a property field, with no checkbox
Declaration
public static void PropertyField(SerializedPropertyData property, GUIContent title, bool onlyHideToggle)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | property | The property being drawn |
GUIContent | title | The label to display for this property |
bool | onlyHideToggle |
PropertyField(SerializedPropertyData, GUIContent, bool, bool)
Draw a property field, with no checkbox
Declaration
public static void PropertyField(SerializedPropertyData property, GUIContent title, bool onlyHideToggle, bool showHideInInspector)
Parameters
Type | Name | Description |
---|---|---|
SerializedPropertyData | property | The property being drawn |
GUIContent | title | The label to display for this property |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |
PropertyFieldInRect(Rect, SerializedPropertyData, SerializedPropertyData)
Draw a property field within a specified region, with checkbox if appropriate
Declaration
public static void PropertyFieldInRect(Rect position, SerializedPropertyData toggleProperty, SerializedPropertyData property)
Parameters
Type | Name | Description |
---|---|---|
Rect | position | Where these properties should be drawn |
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
PropertyFieldInRect(Rect, SerializedPropertyData, SerializedPropertyData, bool, bool)
Draw a property field within a specified region, with checkbox if appropriate
Declaration
public static void PropertyFieldInRect(Rect position, SerializedPropertyData toggleProperty, SerializedPropertyData property, bool onlyHideToggle, bool showHideInInspector)
Parameters
Type | Name | Description |
---|---|---|
Rect | position | Where these properties should be drawn |
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |
PropertyFieldInRect(Rect, SerializedPropertyData, SerializedPropertyData, GUIContent)
Draw a property field within a specified region, with checkbox if appropriate
Declaration
public static void PropertyFieldInRect(Rect position, SerializedPropertyData toggleProperty, SerializedPropertyData property, GUIContent title)
Parameters
Type | Name | Description |
---|---|---|
Rect | position | Where these properties should be drawn |
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
GUIContent | title | The label to display for this property |
PropertyFieldInRect(Rect, SerializedPropertyData, SerializedPropertyData, GUIContent, bool, bool)
Draw a property field within a specified region, with checkbox if appropriate
Declaration
public static void PropertyFieldInRect(Rect position, SerializedPropertyData toggleProperty, SerializedPropertyData property, GUIContent title, bool onlyHideToggle, bool showHideInInspector)
Parameters
Type | Name | Description |
---|---|---|
Rect | position | Where these properties should be drawn |
SerializedPropertyData | toggleProperty | Property representing the checkbox value |
SerializedPropertyData | property | The property being drawn |
GUIContent | title | The label to display for this property |
bool | onlyHideToggle | |
bool | showHideInInspector | Force this property to draw despite a HideInInspector attribute |