docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Settings

    Settings manages a collection of ISettingsRepository.

    Inheritance
    object
    Settings
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: UnityEditor.SettingsManagement
    Assembly: solution.dll
    Syntax
    public sealed class Settings

    Constructors

    Name Description
    Settings(IEnumerable<ISettingsRepository>)

    Create a new Settings instance with a collection of ISettingsRepository.

    Settings(string, string)

    Create a new Settings instance with a UserSettingsRepository and PackageSettingsRepository.

    Methods

    Name Description
    ContainsKey<T>(string, string, SettingsScope)

    Does the repository contain a setting with key and type.

    ContainsKey<T>(string, SettingsScope)

    Does the repository contain a setting with key and type.

    ContainsKey<T, K>(string, string)

    Does the repository contain a setting with key and type.

    DeleteKey<T>(string, string, SettingsScope)

    Remove a key value pair from a settings repository.

    DeleteKey<T>(string, SettingsScope)

    Remove a key value pair from a settings repository.

    DeleteKey<T, K>(string, string)

    Remove a key value pair from a settings repository.

    GetRepository(SettingsScope)

    Find a settings repository that matches the requested scope.

    GetRepository(SettingsScope, string)

    Find a settings repository that matches the requested scope and name.

    Get<T>(string, string, SettingsScope, T)

    Get a value with key of type T, or return the fallback value if no matching key is found.

    Get<T>(string, SettingsScope, T)

    Get a value with key of type T, or return the fallback value if no matching key is found.

    Get<T, K>(string, T, string)

    Get a value with key of type T, or return the fallback value if no matching key is found.

    Save()

    Serialize the state of all settings repositories.

    Set<T>(string, T, string, SettingsScope)

    Set a value for key of type T.

    Set<T>(string, T, SettingsScope)

    Set a value for key of type T.

    Set<T, K>(string, T, string)

    Set a value for key of type T.

    Events

    Name Description
    afterSettingsSaved
    beforeSettingsSaved
    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)