docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BaseSetting<T>

    Base class for implementing Tutorial Framework settings.

    Inheritance
    object
    UserSetting<T>
    BaseSetting<T>
    ProjectSetting<T>
    UserSetting<T>
    Implements
    IUserSetting
    Inherited Members
    UserSetting<T>.key
    UserSetting<T>.settingsRepositoryName
    UserSetting<T>.type
    UserSetting<T>.GetDefaultValue()
    UserSetting<T>.GetValue()
    UserSetting<T>.scope
    UserSetting<T>.settings
    UserSetting<T>.SetValue(object, bool)
    UserSetting<T>.SetValue(T, bool)
    UserSetting<T>.Delete(bool)
    UserSetting<T>.ApplyModifiedProperties()
    UserSetting<T>.Reset(bool)
    UserSetting<T>.defaultValue
    UserSetting<T>.value
    UserSetting<T>.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Tutorials.Core.Editor
    Assembly: Unity.Tutorials.Core.Editor.dll
    Syntax
    public class BaseSetting<T> : UserSetting<T>, IUserSetting
    Type Parameters
    Name Description
    T

    The Type of the value this Setting contains

    Constructors

    BaseSetting(string, string, T, SettingsScope, string)

    Constructs the setting.

    Declaration
    public BaseSetting(string key, string name, T value, SettingsScope scope, string tooltip = null)
    Parameters
    Type Name Description
    string key

    Key for EditorPrefs (User) or JSON file (Project).

    string name

    Use Tr() in order to have localization support.

    T value

    The value to initialize this new BaseSetting to

    SettingsScope scope

    The SettingScope defining the scope of that new setting

    string tooltip

    Use Tr() in order to have localization support.

    Properties

    Name

    Name of the setting.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Tooltip

    Tooltip for the setting.

    Declaration
    public string Tooltip { get; set; }
    Property Value
    Type Description
    string

    Methods

    GetGuiContent()

    Returns Name and Tooltip as GUIContent.

    Declaration
    public GUIContent GetGuiContent()
    Returns
    Type Description
    GUIContent

    A GUIContent containing the Name and Tooltip of that setting

    Implements

    UnityEditor.SettingsManagement.IUserSetting
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)