Storing Data

Plattar provides an API to store and retrieve variables. This can be used to persist data between app sessions and should be used to send data between the 3D and 2D app layers. The provided functions are below:

To get a memory item: This will get the value whether it was stored using either of the following functions.

memory.get(<key>);

To set a memory item for this session only: These values will not persist between sessions so are good to store temporary values

memory.store(<key>, <value>);

To set a memory for this session and future sessions: These values persist between app sessions

memory.persist(<key>, <value>);