Class EditorUtilities
A set of editor utilities used in post-processing editors.
Inherited Members
Namespace: UnityEditor.Rendering.PostProcessing
Assembly: Unity.Postprocessing.Editor.dll
Syntax
public static class EditorUtilities
Properties
isTargetingAndroid
Returns true if the current target is Android, false otherwise.
Declaration
public static bool isTargetingAndroid { get; }
Property Value
| Type | Description |
|---|---|
| bool |
isTargetingConsoles
Returns true if the current target is a console, false otherwise.
Declaration
public static bool isTargetingConsoles { get; }
Property Value
| Type | Description |
|---|---|
| bool |
isTargetingConsolesOrMobiles
Returns true if the current target is a console or a mobile, false
otherwise.
Declaration
public static bool isTargetingConsolesOrMobiles { get; }
Property Value
| Type | Description |
|---|---|
| bool |
isTargetingMobiles
Returns true if the current target is a mobile, false otherwise.
Declaration
public static bool isTargetingMobiles { get; }
Property Value
| Type | Description |
|---|---|
| bool |
isTargetingWebGL
Returns true if the current target is WebGL, false otherwise.
Declaration
public static bool isTargetingWebGL { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
DrawFixMeBox(string, Action)
Draws a UI box with a description and a "Fix Me" button next to it.
Declaration
public static void DrawFixMeBox(string text, Action action)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The description |
| Action | action | The action to execute when the button is clicked |
DrawHeaderLabel(string)
Draws a header label.
Declaration
public static void DrawHeaderLabel(string title)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | The label to display as a header |
DrawOverrideCheckbox(Rect, SerializedProperty)
Draws a toggle using the "override checkbox" style.
Declaration
public static void DrawOverrideCheckbox(Rect rect, SerializedProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | rect | The position and size of the toggle |
| SerializedProperty | property | The override state property for the toggle |
DrawSplitter()
Draws a horizontal split line.
Declaration
public static void DrawSplitter()
GetContent(string)
Gets a GUIContent for the given label and tooltip. These are recycled internally and help reduce the garbage collector pressure in the editor.
Declaration
public static GUIContent GetContent(string textAndTooltip)
Parameters
| Type | Name | Description |
|---|---|---|
| string | textAndTooltip | The label and tooltip separated by a |
Returns
| Type | Description |
|---|---|
| GUIContent | A recycled GUIContent |