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.

You can configure Player Data so that the data is queryable and supports different Access Classes. Queryable data means you can have data that only a player can read and write, data that is public for other players to see, and data that a player can't directly modify.

You can use the Unity Cloud Dashboard to view and edit Player Data.

Access Classes

Cloud Save supports 3 different Access Classes for Player Data.

Access ClassDescription
DefaultReadable and writable by the player the data corresponds to.
PublicReadable by any player, writable by the player the data corresponds to.
Note: Public data is suitable to use for public profile data that you want other players to be able to read from, but that the client for the corresponding player can still write to directly.
ProtectedReadable by the player the data corresponds to, only writeable from a server.
Note: Protected data is suitable to use with Cloud Code or a game server, for server authortative logic where you don't want client side logic to be able to modify that data directly.

Note: If you need data that is readable by players and only writable by a server, you can use Default Game Data.

You can read and write to any Player Data from a server authortative context, such as Cloud Code, a game server, the Unity CLI or the Unity Cloud Dashboard.

To further restrict client access, you can use Access Control for Unity Gaming Services. For example, you can disable all write access from clients and allow write access only from Cloud Code or from a game server.

Limits

These limits are per player, there isn't a limit on the number of players you can have.

  • 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 MiB per Access Class
    • 5 MiB of data in the default Access Class
    • 5 MiB of Public Data
    • 5 MiB of Protected Data

For example, a player can have 2000 keys of 2.5 KB each, or 1 key that is 5 MiB.

Additional resources