Class SessionState<T>
Wrapper utility around SessionState to allow saving arbitrary data for a given session.
Inherited Members
Namespace: Unity.Behavior.Serialization.Editor
Assembly: Unity.Behavior.Serialization.Editor.dll
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 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. |