docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UserSettingsRepository

    A settings repository backed by the UnityEditor.EditorPrefs class.

    Inheritance
    object
    UserSettingsRepository
    Implements
    ISettingsRepository
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEditor.SettingsManagement
    Assembly: solution.dll
    Syntax
    public class UserSettingsRepository : ISettingsRepository

    Properties

    Name Description
    name

    An identifying name for this repository. User settings are named "EditorPrefs."

    path
    scope

    Methods

    Name Description
    ContainsKey<T>(string)

    Does the repository contain a setting with key and type.

    Get<T>(string, T)

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

    Remove<T>(string)

    Remove a key value pair from the settings repository.

    Save()

    Save all settings to their serialized state.

    Set<T>(string, T)

    Set a value for key of type T.

    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)