Documentation

Support

Lobby

Lobby

Lobby data and player data

Learn how lobby and player data are structured and used in Unity Lobby.
Read time 1 minuteLast updated 15 hours ago

Lobbies support two types of custom data:
  • Lobby-scoped data is associated with the entire lobby and can include fields that are indexed for querying.
  • Player-scoped data is associated with a specific player in a specific lobby. Each player in the lobby can have different set properties.

Limits

Lobby data
  • Maximum properties: 20
  • Non-indexed: 2 KB / each
  • Indexed: 128 B / each
  • Maximum number of indexed strings: 5
  • Maximum number of indexed numbers: 5
Player data
  • Maximum properties: 10/player
  • Maximum size: 2KB
  • Not indexable

Data access and visibility

There are three levels of access to data:

Public data

  • Data that is visible to anyone, including players who are not in the lobby.
  • Examples of public data include maps and profile icons.

Member data

  • Data that is only visible to players who have joined the lobby.

Private data

  • Data that is only visible to an individual player who is in the lobby.
  • Lobby data that is only visible to the host, player data that is only visible to the owning player and the host.

Data access table

Depending on a player's role in the lobby (host, member, or non-member), they have different access restrictions to data:

Role of Player

Write lobby data

Read lobby data

Write player data for their player

Write player data for other players

Read player data with the following visibility

Lobby HostYesYes:
  • Public
  • Member
  • Private
YesNoYes:
  • Public
  • Member
Lobby MemberNoYes:
  • Public
  • Member
YesNoYes:
  • Public
  • Member
Non-memberNoYes:
  • Public
NoNoYes
  • Public