# Lobby Player Data

The `KronosLobbyPlayerState` includes a **Player Data** framework that automatically replicates an integer array to all players. This makes it very easy to advertise data about each player, such as their level, or the character / class they are going to play.

## Using The Lobby Player Data

* `SetPlayerData`: Used to set the player data. Overrides previous player data entirely.
* `GetPlayerData`: Used to read the player data.
* `InitPlayerData`: Can be used to set initial player data. Called when the player is initializing.

For example, lets say that players have to select a character in the lobby. You can make it so that each character is represented by an index, and the first element of the player data array is reserved for the character index. E.g. "Character A" = 1,  "Character B" = 2, "Character C" = 3. If the player selects "Character B", set the first element of the player data array to 2. Later if you want to check which character the player is playing, you can get the first element of the player data array.
