docs.unity.cn
    Show / Hide Table of Contents

    Class SettingsGUILayout

    Provides extension methods for that also implement settings-specific functionality.

    Inheritance
    Object
    SettingsGUILayout
    Namespace: UnityEditor.SettingsManagement
    Syntax
    public static class SettingsGUILayout : object

    Methods

    DoResetContextMenuForLastRect(IUserSetting)

    Implements a "Reset" context menu entry for the specified user setting. using the rect from the last automatic layout.

    Declaration
    public static void DoResetContextMenuForLastRect(IUserSetting setting)
    Parameters
    Type Name Description
    IUserSetting setting

    The target setting for the "Reset" context menu entry.

    SearchableColorField(GUIContent, Color, String)

    Creates a color field that implements search filtering.

    Declaration
    public static Color SearchableColorField(GUIContent label, Color value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    Color value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Color

    The value set by the user.

    SearchableColorField(String, Color, String)

    Creates a color field that implements search filtering.

    Declaration
    public static Color SearchableColorField(string label, Color value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    Color value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Color

    The value set by the user.

    SearchableFloatField(GUIContent, Single, String)

    Creates a float field that implements search filtering.

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

    Specify a instance to set the label that appears beside the value field.

    Single value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SearchableFloatField(String, Single, String)

    Creates a float field that implements search filtering.

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

    Specify a string to set the label that appears beside the value field.

    Single value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SearchableIntField(GUIContent, Int32, String)

    Creates an int field that implements search filtering.

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

    Specify a instance to set the label that appears beside the value field.

    Int32 value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Int32

    The value set by the user.

    SearchableIntField(String, Int32, String)

    Creates an int field that implements search filtering.

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

    Specify a string to set the label that appears beside the value field.

    Int32 value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Int32

    The value set by the user.

    SearchableSlider(GUIContent, Single, Single, Single, String)

    Creates 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

    Specify a instance to set the label that appears beside the value field.

    Single value

    The value to edit.

    Single min

    The value at the left end of the slider.

    Single max

    The value at the right end of the slider.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SearchableSlider(String, Single, Single, Single, String)

    Creates 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

    Specify a string to set the label that appears beside the value field.

    Single value

    The value to edit.

    Single min

    The value at the left end of the slider.

    Single max

    The value at the right end of the slider.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SearchableTextField(GUIContent, String, String)

    Creates a text field that implements search filtering.

    Declaration
    public static string SearchableTextField(GUIContent label, string value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    String value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    String

    The value set by the user.

    SearchableTextField(String, String, String)

    Creates a text field that implements search filtering.

    Declaration
    public static string SearchableTextField(string label, string value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    String value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    String

    The value set by the user.

    SearchableToggle(GUIContent, Boolean, String)

    Creates a toggle field that implements search filtering.

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

    Specify a instance to set the label that appears beside the value field.

    Boolean value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Boolean

    The value set by the user.

    SearchableToggle(String, Boolean, String)

    Creates a toggle field that implements search filtering.

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

    Specify a string to set the label that appears beside the value field.

    Boolean value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Boolean

    The value set by the user.

    SettingsColorField(GUIContent, UserSetting<Color>, String)

    Creates a color field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static Color SettingsColorField(GUIContent label, UserSetting<Color> value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<Color> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Color

    The value set by the user.

    SettingsColorField(String, UserSetting<Color>, String)

    Creates a color field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static Color SettingsColorField(string label, UserSetting<Color> value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<Color> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Color

    The value set by the user.

    SettingsFloatField(GUIContent, UserSetting<Single>, String)

    Creates a float field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static float SettingsFloatField(GUIContent label, UserSetting<float> value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<Single> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SettingsFloatField(String, UserSetting<Single>, String)

    Creates a float field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static float SettingsFloatField(string label, UserSetting<float> value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<Single> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SettingsIntField(GUIContent, UserSetting<Int32>, String)

    Creates an integer field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static int SettingsIntField(GUIContent label, UserSetting<int> value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<Int32> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Int32

    The value set by the user.

    SettingsIntField(String, UserSetting<Int32>, String)

    Creates an integer field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static int SettingsIntField(string label, UserSetting<int> value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<Int32> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Int32

    The value set by the user.

    SettingsSlider(GUIContent, UserSetting<Int32>, Int32, Int32, String)

    Creates an int slider that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static int SettingsSlider(GUIContent label, UserSetting<int> value, int min, int max, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<Int32> value

    The value to edit.

    Int32 min

    The value at the left end of the slider.

    Int32 max

    The value at the right end of the slider.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Int32

    The value set by the user.

    SettingsSlider(GUIContent, UserSetting<Single>, Single, Single, String)

    Creates a float slider that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static float SettingsSlider(GUIContent label, UserSetting<float> value, float min, float max, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<Single> value

    The value to edit.

    Single min

    The value at the left end of the slider.

    Single max

    The value at the right end of the slider.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SettingsSlider(String, UserSetting<Int32>, Int32, Int32, String)

    Creates an int slider that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static int SettingsSlider(string label, UserSetting<int> value, int min, int max, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<Int32> value

    The value to edit.

    Int32 min

    The value at the left end of the slider.

    Int32 max

    The value at the right end of the slider.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Int32

    The value set by the user.

    SettingsSlider(String, UserSetting<Single>, Single, Single, String)

    Creates a float slider that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static float SettingsSlider(string label, UserSetting<float> value, float min, float max, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<Single> value

    The value to edit.

    Single min

    The value at the left end of the slider.

    Single max

    The value at the right end of the slider.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Single

    The value set by the user.

    SettingsTextField(GUIContent, UserSetting<String>, String)

    Creates a text field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static string SettingsTextField(GUIContent label, UserSetting<string> value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<String> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    String

    The value set by the user.

    SettingsTextField(String, UserSetting<String>, String)

    Creates a text field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static string SettingsTextField(string label, UserSetting<string> value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<String> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    String

    The value set by the user.

    SettingsToggle(GUIContent, UserSetting<Boolean>, String)

    Creates a boolean toggle field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static bool SettingsToggle(GUIContent label, UserSetting<bool> value, string searchContext)
    Parameters
    Type Name Description
    GUIContent label

    Specify a instance to set the label that appears beside the value field.

    UserSetting<Boolean> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Boolean

    The value set by the user.

    SettingsToggle(String, UserSetting<Boolean>, String)

    Creates a boolean toggle field that implements search filtering and a DoResetContextMenuForLastRect(IUserSetting) context menu entry.

    Declaration
    public static bool SettingsToggle(string label, UserSetting<bool> value, string searchContext)
    Parameters
    Type Name Description
    String label

    Specify a string to set the label that appears beside the value field.

    UserSetting<Boolean> value

    The value to edit.

    String searchContext

    A string representing the current search query. Empty or null strings match any value.

    Returns
    Type Description
    Boolean

    The value set by the user.

    Back to top Copyright © 2021 Unity Technologies
    Generated by DocFX
    on Monday, December 6, 2021
    Terms of use