# SessionState

> SessionState is a Key-Value Store intended for storing and retrieving Editor session state that should survive assembly reloading.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public class SessionState
```

## Remarks

The state information stored in SessionState is cleared when Unity exits. For storing state information that should be persistent across Unity Editor sessions use [EditorPrefs](/engine/6000.6/script-reference/unityeditor/editorprefs.md).

## Static Methods

| Method                                                                                               | Description                                           |
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [EraseBool](/engine/6000.6/script-reference/unityeditor/sessionstate/erasebool.md)                   | Erase a Boolean entry in the key-value store.         |
| [EraseEntityId](/engine/6000.6/script-reference/unityeditor/sessionstate/eraseentityid.md)           | Erase an EntityId entry in the key-value store.       |
| [EraseEntityIdArray](/engine/6000.6/script-reference/unityeditor/sessionstate/eraseentityidarray.md) | Erase an EntityId array entry in the key-value store. |
| [EraseFloat](/engine/6000.6/script-reference/unityeditor/sessionstate/erasefloat.md)                 | Erase a Float entry in the key-value store.           |
| [EraseInt](/engine/6000.6/script-reference/unityeditor/sessionstate/eraseint.md)                     | Erase an Integer entry in the key-value store.        |
| [EraseIntArray](/engine/6000.6/script-reference/unityeditor/sessionstate/eraseintarray.md)           | Erase an Integer array entry in the key-value store.  |
| [EraseString](/engine/6000.6/script-reference/unityeditor/sessionstate/erasestring.md)               | Erase a String entry in the key-value store.          |
| [EraseVector3](/engine/6000.6/script-reference/unityeditor/sessionstate/erasevector3.md)             | Erase a Vector3 entry in the key-value store.         |
| [GetBool](/engine/6000.6/script-reference/unityeditor/sessionstate/getbool.md)                       | Retrieve a Boolean value.                             |
| [GetEntityId](/engine/6000.6/script-reference/unityeditor/sessionstate/getentityid.md)               | Retrieve an EntityId value.                           |
| [GetEntityIdArray](/engine/6000.6/script-reference/unityeditor/sessionstate/getentityidarray.md)     | Retrieve an EntityId array.                           |
| [GetFloat](/engine/6000.6/script-reference/unityeditor/sessionstate/getfloat.md)                     | Retrieve a Float value.                               |
| [GetInt](/engine/6000.6/script-reference/unityeditor/sessionstate/getint.md)                         | Retrieve an Integer value.                            |
| [GetIntArray](/engine/6000.6/script-reference/unityeditor/sessionstate/getintarray.md)               | Retrieve an Integer array.                            |
| [GetString](/engine/6000.6/script-reference/unityeditor/sessionstate/getstring.md)                   | Retrieve a String value.                              |
| [GetVector3](/engine/6000.6/script-reference/unityeditor/sessionstate/getvector3.md)                 | Retrieve a Vector3.                                   |
| [SetBool](/engine/6000.6/script-reference/unityeditor/sessionstate/setbool.md)                       | Store a Boolean value.                                |
| [SetEntityId](/engine/6000.6/script-reference/unityeditor/sessionstate/setentityid.md)               | Store an EntityId value.                              |
| [SetEntityIdArray](/engine/6000.6/script-reference/unityeditor/sessionstate/setentityidarray.md)     | Store an EntityId array.                              |
| [SetFloat](/engine/6000.6/script-reference/unityeditor/sessionstate/setfloat.md)                     | Store a Float value.                                  |
| [SetInt](/engine/6000.6/script-reference/unityeditor/sessionstate/setint.md)                         | Store an Integer value.                               |
| [SetIntArray](/engine/6000.6/script-reference/unityeditor/sessionstate/setintarray.md)               | Store an Integer array.                               |
| [SetString](/engine/6000.6/script-reference/unityeditor/sessionstate/setstring.md)                   | Store a String value.                                 |
| [SetVector3](/engine/6000.6/script-reference/unityeditor/sessionstate/setvector3.md)                 | Store a Vector3.                                      |
