Generate player IDs
Amazon GameLift uses a player session to represent a player connected to a game session. Amazon GameLift creates a player session each time a player connects to a game session using a game client integrated with Amazon GameLift. When a player leaves a game, the player session ends. Amazon GameLift doesn't reuse player sessions.
The following code example randomly generates unique player IDs:
bool includeBrackets = false; bool includeDashes = true; string playerId = AZ::Uuid::CreateRandom().ToString<string>(includeBrackets, includeDashes);
For more information about player sessions, see View data on game and player sessions.