docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UserSettings<T>

    Wrapper utility around UnityEditor.EditorUserSettings to allow saving arbitrary data as User settings.

    Inheritance
    object
    UserSettings<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Behavior.Serialization.Editor
    Assembly: Unity.Behavior.Serialization.Editor.dll
    Syntax
    public static class UserSettings<T> where T : class, new()
    Type Parameters
    Name Description
    T

    The type of the setting

    Methods

    Clear(string)

    Clears the data stored at the provided key.

    Declaration
    public static void Clear(string key)
    Parameters
    Type Name Description
    string key

    The key to the data.

    GetOrCreate(string)

    Returns an instance of T for the provided key.

    Declaration
    public static T GetOrCreate(string key)
    Parameters
    Type Name Description
    string key

    The key to the data.

    Returns
    Type Description
    T

    The T instance.

    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)