Multi User Support
LootLocker now supports Multi User capabilities in both the Unity and Unreal SDKs, allowing your game to 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.
What is Multi User Support?
Multi User support enables your game to:
Authenticate and manage multiple players simultaneously.
Switch between active users or make API calls for specific users.
Maintain separate sessions and data for each player.
This feature is especially useful for local multiplayer games, shared devices, or games that allow players to switch accounts without restarting the game.
How It Works
When using Multi User support, the SDK manages a set of player sessions. There is always a "default" player, but you can explicitly specify which player to use for any API call by providing their ULID.
All SDK methods now accept an optional forPlayerWithUlid
parameter. If you do not specify this, the SDK will use the default player. For advanced scenarios, you should always provide the ULID to ensure the correct player is targeted.
Best Practice: Always provide the ULID when making API calls in a multi user context to avoid ambiguity.
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 LootLocker SDK will store this data locally and make this session available for subsequent calls. This is now an active player. Active in the LootLocker multi user context simply means that "this player has been active this game session".
When the game is restarted but no calls have been made to LootLocker, all players that have previously been active (unless the session has been ended or cache cleared) are considered inactive but still cached. That means that the session data is still stored on the device and can be picked up at any time.
Cached player data in the LootLocker multi user context means that there is session data about this player on the local device.
How To Guides
Last updated