Class SettingsGUILayout | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class SettingsGUILayout

    Extension methods for GUILayout that also implement settings-specific functionality.

    Inheritance
    System.Object
    SettingsGUILayout
    Namespace: UnityEditor.SettingsManagement
    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(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.

    System.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(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
    System.String label

    Label in front of the value field.

    Color value

    The value to edit.

    System.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(GUIContent, Single, 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.

    System.Single value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    The value that has been set by the user.

    SearchableFloatField(String, Single, String)

    A float field that implements search filtering.

    Declaration
    public static float SearchableFloatField(string label, float value, string searchContext)
    Parameters
    Type Name Description
    System.String label

    Label in front of the value field.

    System.Single value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    The value that has been set by the user.

    SearchableIntField(GUIContent, Int32, 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.

    System.Int32 value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Int32

    The value that has been set by the user.

    SearchableIntField(String, Int32, String)

    An int field that implements search filtering.

    Declaration
    public static int SearchableIntField(string label, int value, string searchContext)
    Parameters
    Type Name Description
    System.String label

    Label in front of the value field.

    System.Int32 value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Int32

    The value that has been set by the user.

    SearchableSlider(GUIContent, Single, Single, Single, 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.

    System.Single value

    The value to edit.

    System.Single min

    The value at the left end of the slider.

    System.Single max

    The value at the right end of the slider.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    The value that has been set by the user.

    SearchableSlider(String, Single, Single, Single, 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
    System.String label

    Label in front of the value field.

    System.Single value

    The value to edit.

    System.Single min

    The value at the left end of the slider.

    System.Single max

    The value at the right end of the slider.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    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.

    System.String value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.String

    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
    System.String label

    Label in front of the value field.

    System.String value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.String

    The value that has been set by the user.

    SearchableToggle(GUIContent, Boolean, 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.

    System.Boolean value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Boolean

    The value that has been set by the user.

    SearchableToggle(String, Boolean, String)

    An toggle field that implements search filtering.

    Declaration
    public static bool SearchableToggle(string label, bool value, string searchContext)
    Parameters
    Type Name Description
    System.String label

    Label in front of the value field.

    System.Boolean value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Boolean

    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.

    System.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(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
    System.String label

    Label in front of the value field.

    UserSetting<Color> value

    The value to edit.

    System.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(GUIContent, UserSetting<Single>, 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<System.Single> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    The value that has been set by the user.

    SettingsFloatField(String, UserSetting<Single>, 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
    System.String label

    Label in front of the value field.

    UserSetting<System.Single> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    The value that has been set by the user.

    SettingsIntField(GUIContent, UserSetting<Int32>, 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<System.Int32> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Int32

    The value that has been set by the user.

    SettingsIntField(String, UserSetting<Int32>, 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
    System.String label

    Label in front of the value field.

    UserSetting<System.Int32> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Int32

    The value that has been set by the user.

    SettingsSlider(GUIContent, UserSetting<Int32>, Int32, Int32, 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<System.Int32> value

    The value to edit.

    System.Int32 min

    The value at the left end of the slider.

    System.Int32 max

    The value at the right end of the slider.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Int32

    The value that has been set by the user.

    SettingsSlider(GUIContent, UserSetting<Single>, Single, Single, 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<System.Single> value

    The value to edit.

    System.Single min

    The value at the left end of the slider.

    System.Single max

    The value at the right end of the slider.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    The value that has been set by the user.

    SettingsSlider(String, UserSetting<Int32>, Int32, Int32, 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
    System.String label

    Label in front of the value field.

    UserSetting<System.Int32> value

    The value to edit.

    System.Int32 min

    The value at the left end of the slider.

    System.Int32 max

    The value at the right end of the slider.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Int32

    The value that has been set by the user.

    SettingsSlider(String, UserSetting<Single>, Single, Single, 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
    System.String label

    Label in front of the value field.

    UserSetting<System.Single> value

    The value to edit.

    System.Single min

    The value at the left end of the slider.

    System.Single max

    The value at the right end of the slider.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Single

    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<System.String> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.String

    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
    System.String label

    Label in front of the value field.

    UserSetting<System.String> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.String

    The value that has been set by the user.

    SettingsToggle(GUIContent, UserSetting<Boolean>, 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<System.Boolean> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Boolean

    The value that has been set by the user.

    SettingsToggle(String, UserSetting<Boolean>, 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
    System.String label

    Label in front of the value field.

    UserSetting<System.Boolean> value

    The value to edit.

    System.String searchContext

    A string representing the current search query. Empty or null strings are to be treated as matching any value.

    Returns
    Type Description
    System.Boolean

    The value that has been set by the user.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023