Class SessionState<T> | Serialization | 1.6.2-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class SessionState<T>

    Wrapper utility around SessionState to allow saving arbitrary data for a given session.

    Inheritance
    Object
    SessionState<T>
    Namespace: Unity.Serialization.Editor
    Syntax
    public static class SessionState<T>
        where T : class, new()
    Type Parameters
    Name Description
    T

    The type of the session state data

    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 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 instance.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023