Cloud Save Player Data
Cloud Save Player Data is key/value storage intended for data associated with a player. You can read and write Player Data from a game client and from Cloud Code.
Player Data can be configured to be queryable and it supports different Access Classes, so you can have data only a player can read and write, data that is public for other player to see and data that is not visible to players.
Access Classes
There are 3 different Access Classes for Cloud Save Player Data.
- Default: Readable and writable by the player the data corresponds to
- Public: Readable by any player, writable by the player the data corresponds to
- Protected: Readable by the player the data corresponds to, only writeable from a server
Public data is suitable for using for public profile data.
Protected data is intended for use with Cloud Code or a game server.
You can further restrict client access using UGS Access Controls (e.g. disable all writes from clients and allow them only from a game server).
Player Data in any Access Class can be read or written to using Cloud Code or from a game server.
Full support for Access Classes was added in version 3.1 of the Cloud Save SDK for Unity.
Limits
- Player Data has a limit of 2000 key/value pairs per Access Class
- 2000 keys in the default Access Class
- 2000 keys in Public Data
- 2000 keys in Protected Data
- Player Data has a total limit of 5 MB per Access Class
- 5 MB of data in the default Access Class
- 5 MB of Public Data
- 5 MB of Protected Data
e.g. You can have 2000 keys of 2.5 KB each, or 1 key that is 5 MB.