Manage multiple simultaneous player sessions on a single device.
Ideal for local multiplayer, hot seat, and couch co-op games. All SDK methods accept an optional player-ULID parameter to target a specific session. Players move through three states: active (authenticated this session), inactive-cached (session data survives a restart), and cached (device-local data, no current session).
See the LootLocker documentation.
◆ ClearAllPlayerCaches()
| static void LootLocker.Requests.LootLockerSDKManager.ClearAllPlayerCaches |
( |
| ) |
|
|
inlinestatic |
Remove all stored state information (players will need to re-authenticate).
This will clear all player states, including the default player state. If you want to clear the state for a specific player, use ClearCacheForPlayer(string playerUlid) instead. This will also reset the default player to an empty state.
◆ ClearAllPlayerCachesExceptForPlayer()
| static void LootLocker.Requests.LootLockerSDKManager.ClearAllPlayerCachesExceptForPlayer |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Remove all stored state information except for the specified player (players will need to re-authenticate).
This will clear all player states except for the specified player. If the specified player is the default player, it will remain as the default player.
- Parameters
-
| playerUlid | The ULID of the player to save the cache for. |
◆ ClearCacheForPlayer()
| static void LootLocker.Requests.LootLockerSDKManager.ClearCacheForPlayer |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Remove stored state information for the specified player if present (player will need to re-authenticate).
If the player is the default player, the default player will be set to an empty state. If the player is not the default player, the state will be removed but the default player will not be changed. If the player is not found, no action will be taken.
- Parameters
-
| playerUlid | The ULID of the player whose state should be cleared. |
◆ GetActivePlayerUlids()
| static List< string > LootLocker.Requests.LootLockerSDKManager.GetActivePlayerUlids |
( |
| ) |
|
|
inlinestatic |
Get a list of player ULIDs that have been active since game start (or state initialization).
- Returns
- List of player ULIDs that have been active since game start.
◆ GetCachedPlayerUlids()
| static List< string > LootLocker.Requests.LootLockerSDKManager.GetCachedPlayerUlids |
( |
| ) |
|
|
inlinestatic |
Get a list of player ULIDs that there is a stored state for.
This includes both active and inactive players.
- Returns
- List of player ULIDs that have a stored state.
◆ GetDefaultPlayerUlid()
| static string LootLocker.Requests.LootLockerSDKManager.GetDefaultPlayerUlid |
( |
| ) |
|
|
inlinestatic |
Get the ULID of the player state that is used as the default state for calls that have no other player specified.
- Returns
- The ULID of the default player state.
◆ GetPlayerDataForPlayerWithUlid()
| static LootLockerPlayerData LootLocker.Requests.LootLockerSDKManager.GetPlayerDataForPlayerWithUlid |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Get the information from the stored state for the player with the specified ULID.
- Returns
- The data stored for the specified player. Will be null if no data is found.
◆ GetSavedStateOrDefaultOrEmptyForPlayer()
| static LootLockerPlayerData LootLocker.Requests.LootLockerSDKManager.GetSavedStateOrDefaultOrEmptyForPlayer |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Get the player state for the player with the specified ULID, or the default player state if the supplied player ULID is empty, or an empty state if none of the previous are present.
- Parameters
-
| playerUlid | The ULID of the player whose state should be retrieved. |
- Returns
- The player state for the specified player, or the default player state if the supplied ULID is empty or could not be found, or an empty state if none of the previous are valid.
◆ MakePlayerActive()
| static bool LootLocker.Requests.LootLockerSDKManager.MakePlayerActive |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Make the state for the player with the specified ULID to be "active".
- Returns
- Whether the player was successfully activated or not
◆ SetAllPlayersToInactive()
| static void LootLocker.Requests.LootLockerSDKManager.SetAllPlayersToInactive |
( |
| ) |
|
|
inlinestatic |
Make the state for all currently active players to be "inactive".
This will not delete the state, but it will remove all players from the list of active players.
◆ SetAllPlayersToInactiveExceptForPlayer()
| static void LootLocker.Requests.LootLockerSDKManager.SetAllPlayersToInactiveExceptForPlayer |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Make the state for all currently active players except the specified player to be "inactive".
This will not delete the state, but it will remove all players except the specified one from the list of active players.
- Parameters
-
| playerUlid | The ULID of the player to keep active. |
◆ SetDefaultPlayerUlid()
| static bool LootLocker.Requests.LootLockerSDKManager.SetDefaultPlayerUlid |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Set the player state that is used as the default state for calls that have no other player specified.
- Parameters
-
| playerUlid | The ULID of the player state to set as default. |
- Returns
- True if the default player ULID was set successfully, false otherwise.
◆ SetPlayerUlidToInactive()
| static void LootLocker.Requests.LootLockerSDKManager.SetPlayerUlidToInactive |
( |
string |
playerUlid | ) |
|
|
inlinestatic |
Make the state for the player with the specified ULID to be "inactive".
This will not delete the state, but it will remove it from the list of active players.
- Parameters
-
| playerUlid | The ULID of the player whose state should be set to inactive. |