Class SettingsGUILayout
Extension methods for GUILayout that also implement settings-specific functionality.
Inherited Members
Namespace: UnityEditor.SettingsManagement
Assembly: Unity.Settings.Editor.dll
Syntax
public static class SettingsGUILayout
Methods
DoResetContextMenuForLastRect(IUserSetting)
Using the last automatically layoutted rect, implement a context click menu for a user setting.
Declaration
public static void DoResetContextMenuForLastRect(IUserSetting setting)
Parameters
Type | Name | Description |
---|---|---|
IUserSetting | setting | The target setting for the reset context menu. |
SearchableColorField(string, Color, string)
An color field that implements search filtering.
Declaration
public static Color SearchableColorField(string label, Color value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
Color | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
Color | The value that has been set by the user. |
SearchableColorField(GUIContent, Color, string)
An color field that implements search filtering.
Declaration
public static Color SearchableColorField(GUIContent label, Color value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
Color | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
Color | The value that has been set by the user. |
SearchableFloatField(string, float, string)
A float field that implements search filtering.
Declaration
public static float SearchableFloatField(string label, float value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
float | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SearchableFloatField(GUIContent, float, string)
A float field that implements search filtering.
Declaration
public static float SearchableFloatField(GUIContent label, float value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
float | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SearchableIntField(string, int, string)
An int field that implements search filtering.
Declaration
public static int SearchableIntField(string label, int value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
int | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
int | The value that has been set by the user. |
SearchableIntField(GUIContent, int, string)
An int field that implements search filtering.
Declaration
public static int SearchableIntField(GUIContent label, int value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
int | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
int | The value that has been set by the user. |
SearchableSlider(string, float, float, float, string)
A slider that implements search filtering.
Declaration
public static float SearchableSlider(string label, float value, float min, float max, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
float | value | The value to edit. |
float | min | The value at the left end of the slider. |
float | max | The value at the right end of the slider. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SearchableSlider(GUIContent, float, float, float, string)
A slider that implements search filtering.
Declaration
public static float SearchableSlider(GUIContent label, float value, float min, float max, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
float | value | The value to edit. |
float | min | The value at the left end of the slider. |
float | max | The value at the right end of the slider. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SearchableTextField(string, string, string)
An text field that implements search filtering.
Declaration
public static string SearchableTextField(string label, string value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
string | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
string | The value that has been set by the user. |
SearchableTextField(GUIContent, string, string)
An text field that implements search filtering.
Declaration
public static string SearchableTextField(GUIContent label, string value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
string | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
string | The value that has been set by the user. |
SearchableToggle(string, bool, string)
An toggle field that implements search filtering.
Declaration
public static bool SearchableToggle(string label, bool value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
bool | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
bool | The value that has been set by the user. |
SearchableToggle(GUIContent, bool, string)
An toggle field that implements search filtering.
Declaration
public static bool SearchableToggle(GUIContent label, bool value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
bool | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
bool | The value that has been set by the user. |
SettingsColorField(string, UserSetting<Color>, string)
A color field that implements search filtering and context menu reset.
Declaration
public static Color SettingsColorField(string label, UserSetting<Color> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<Color> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
Color | The value that has been set by the user. |
SettingsColorField(GUIContent, UserSetting<Color>, string)
A color field that implements search filtering and context menu reset.
Declaration
public static Color SettingsColorField(GUIContent label, UserSetting<Color> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<Color> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
Color | The value that has been set by the user. |
SettingsFloatField(string, UserSetting<float>, string)
A float field that implements search filtering and context menu reset.
Declaration
public static float SettingsFloatField(string label, UserSetting<float> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<float> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SettingsFloatField(GUIContent, UserSetting<float>, string)
A float field that implements search filtering and context menu reset.
Declaration
public static float SettingsFloatField(GUIContent label, UserSetting<float> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<float> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SettingsIntField(string, UserSetting<int>, string)
An integer field that implements search filtering and context menu reset.
Declaration
public static int SettingsIntField(string label, UserSetting<int> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<int> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
int | The value that has been set by the user. |
SettingsIntField(GUIContent, UserSetting<int>, string)
An integer field that implements search filtering and context menu reset.
Declaration
public static int SettingsIntField(GUIContent label, UserSetting<int> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<int> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
int | The value that has been set by the user. |
SettingsSlider(string, UserSetting<int>, int, int, string)
A slider that implements search filtering and context menu reset.
Declaration
public static int SettingsSlider(string label, UserSetting<int> value, int min, int max, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<int> | value | The value to edit. |
int | min | The value at the left end of the slider. |
int | max | The value at the right end of the slider. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
int | The value that has been set by the user. |
SettingsSlider(string, UserSetting<float>, float, float, string)
A slider that implements search filtering and context menu reset.
Declaration
public static float SettingsSlider(string label, UserSetting<float> value, float min, float max, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<float> | value | The value to edit. |
float | min | The value at the left end of the slider. |
float | max | The value at the right end of the slider. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SettingsSlider(GUIContent, UserSetting<int>, int, int, string)
A slider that implements search filtering and context menu reset.
Declaration
public static int SettingsSlider(GUIContent label, UserSetting<int> value, int min, int max, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<int> | value | The value to edit. |
int | min | The value at the left end of the slider. |
int | max | The value at the right end of the slider. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
int | The value that has been set by the user. |
SettingsSlider(GUIContent, UserSetting<float>, float, float, string)
A slider that implements search filtering and context menu reset.
Declaration
public static float SettingsSlider(GUIContent label, UserSetting<float> value, float min, float max, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<float> | value | The value to edit. |
float | min | The value at the left end of the slider. |
float | max | The value at the right end of the slider. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
float | The value that has been set by the user. |
SettingsTextField(string, UserSetting<string>, string)
A text field that implements search filtering and context menu reset.
Declaration
public static string SettingsTextField(string label, UserSetting<string> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<string> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
string | The value that has been set by the user. |
SettingsTextField(GUIContent, UserSetting<string>, string)
A text field that implements search filtering and context menu reset.
Declaration
public static string SettingsTextField(GUIContent label, UserSetting<string> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<string> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
string | The value that has been set by the user. |
SettingsToggle(string, UserSetting<bool>, string)
A boolean toggle field that implements search filtering and context menu reset.
Declaration
public static bool SettingsToggle(string label, UserSetting<bool> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label in front of the value field. |
UserSetting<bool> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
bool | The value that has been set by the user. |
SettingsToggle(GUIContent, UserSetting<bool>, string)
A boolean toggle field that implements search filtering and context menu reset.
Declaration
public static bool SettingsToggle(GUIContent label, UserSetting<bool> value, string searchContext)
Parameters
Type | Name | Description |
---|---|---|
GUIContent | label | Label in front of the value field. |
UserSetting<bool> | value | The value to edit. |
string | searchContext | A string representing the current search query. Empty or null strings are to be treated as matching any value. |
Returns
Type | Description |
---|---|
bool | The value that has been set by the user. |