docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor UserSetting

    UserSetting(Settings, string, T, SettingsScope)

    Constructor for UserSetting{T} type.

    Declaration
    public UserSetting(Settings settings, string key, T value, SettingsScope scope = SettingsScope.Project)
    Parameters
    Type Name Description
    Settings settings

    The Settings instance that this setting should be saved and loaded from.

    string key

    The key for this value.

    T value

    The default value for this key.

    SettingsScope scope

    The scope at which to save this setting.

    UserSetting(Settings, string, string, T, SettingsScope)

    Constructor for UserSetting{T} type.

    Declaration
    public UserSetting(Settings settings, string repository, string key, T value, SettingsScope scope = SettingsScope.Project)
    Parameters
    Type Name Description
    Settings settings

    The Settings instance that this setting should be saved and loaded from.

    string repository

    The ISettingsRepository name that this setting should be saved and loaded from. Pass null to save to first available instance.

    string key

    The key for this value.

    T value

    The default value for this key.

    SettingsScope scope

    The scope at which to save this setting.

    In This Article
    Back to top
    Copyright © 2024 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)