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

    Class UserSettingAttribute

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

    Inheritance
    System.Object
    System.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
    System.String category
    System.String title
    System.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
    System.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
    System.Boolean

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

    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