LootLocker supports Multi User capabilities in both the Unity and Unreal SDKs, letting your game manage multiple player sessions at once. This is ideal for games with local multiplayer, hot seat, or any scenario where you need to authenticate and interact with more than one player at a time.
Multi User support enables your game to authenticate and manage multiple players simultaneously, switch between active users or make API calls for specific users, and maintain separate sessions and data for each player. This is especially useful for local multiplayer games, shared devices, or games that let players switch accounts without restarting the game.
How It Works
When using Multi User support, the SDK manages a set of player sessions. There's always a "default" player, but you can explicitly specify which player to use for any API call by providing their ULID.
All SDK methods accept an optional forPlayerWithUlid parameter. If you don't specify this, the SDK uses the default player. For advanced scenarios, always provide the ULID to ensure the correct player is targeted.
Active, Inactive, or Cached
There are three states to be aware of for local players. When a player starts a LootLocker session using any authentication method, the SDK stores this data locally and makes the session available for subsequent calls — this is now an active player. Active in the LootLocker multi user context simply means "this player has been active this game session."
When the game restarts but no calls have been made to LootLocker, all players who were previously active (unless the session has been ended or the cache cleared) are considered inactive but still cached — the session data is still stored on the device and can be picked up at any time.
Cached player data means there's session data about this player on the local device.
Use Cases
- Local multiplayer / hot seat games
- Shared devices with multiple players
- Switching player accounts without restarting the game
- Server-side management of multiple player sessions