Class UserSettingAttribute | Settings Manager | 1.0.1
docs.unity.cn
    Show / Hide Table of Contents

    Class UserSettingAttribute

    Register a static field of type IUserSetting with the UserSettingsProvider window.

    Inheritance
    Object
    Attribute
    UserSettingAttribute
    Namespace: UnityEditor.SettingsManagement
    Syntax
    [AttributeUsage(AttributeTargets.Field)]
    public sealed class UserSettingAttribute : Attribute, _Attribute

    Constructors

    UserSettingAttribute()

    Register a static field as a setting. Field must be of a type implementing IUserSetting.

    Declaration
    public UserSettingAttribute()

    UserSettingAttribute(String, String, String)

    Register a static field as a setting and create an entry in the UI. Field must be of a type implementing IUserSetting.

    Declaration
    public UserSettingAttribute(string category, string title, string tooltip = null)
    Parameters
    Type Name Description
    String category
    String title
    String tooltip

    Properties

    category

    Settings that are automatically scraped from assemblies are displayed in groups, organized by category.

    Declaration
    public string category { get; }
    Property Value
    Type Description
    String

    The title of the group of settings that this setting will be shown under.

    title

    Declaration
    public GUIContent title { get; }
    Property Value
    Type Description
    GUIContent

    The label to show for this setting.

    visibleInSettingsProvider

    Declaration
    public bool visibleInSettingsProvider { get; }
    Property Value
    Type Description
    Boolean

    True if this field should be shown in the UserSettingsProvider interface, false if not.

    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX