Unity Package Types
Data Store allows you to save state for your experience. It is commonly used to store user state such as inventory items (if you choose not to use backpack), XP, level, etc.
The Data Store system supports multiple scopes, however in the short term it is limited to storing data on a per user basis.
“Area” of storage. Currently only
The full “path” of the variable. For example
The name of an individual variable in a “key”. For example
The main two nodes that you will likely use are
Get Variable and
The data store nodes are asynchronous, which means that they don’t execute immediately and have delayed response. To make the nodes work, make sure that the first node in the execution flow is marked as a “Coroutine”.
These are all the available scripting nodes
- Get Variable
- Set Variable
- Delete Variable
- Clear All Variables — Clear the entire state
- Has Variable — Check if a variable exists
- Has Any Variable — Check if there is anything in the current data store scope
- Dump as JSON String — Useful for debugging, this outputs a string which you can
Debug Loginto the console.
Limits & Constraints
You can store values in any of the following types. If an unsupported type is used, the node will fail.
Key & Variable Names
- Max variable nested depth is 10
- Max variable name length is 64
- Max key length is 400
- Variable names cannot start with a number
- Variable names can only contain alphanumeric characters (
a-z A-Z 0-9) and
- Variable names cannot start or end with
Data Size & Bandwidth
- The maximum size of of the total storage (per user) is
- Data store mutations (set value) are rate limited to 10 requests per minute. Changes made in the same update frame are batched together, and only count as a single mutation.