Track when and how players are active across all platforms in real time.
Basic Presence records session start/end times, automatically computing CCU (concurrent users) and session length. Rich Presence (available to select customers) extends this with developer-defined per-session player statuses (e.g., Main Menu, Level 3) that produce a detailed activity timeline per session — useful for analytics, live-ops, and player support.
See the LootLocker documentation.
◆ ForceStartPresenceConnection()
| static void LootLocker.Requests.LootLockerSDKManager.ForceStartPresenceConnection |
( |
LootLockerPresenceCallback |
onComplete = null, |
|
|
string |
forPlayerWithUlid = null |
|
) |
| |
|
inlinestatic |
Force start the Presence WebSocket connection manually.
This will override the automatic presence management and manually establish a connection. Use this when you need precise control over presence connections, otherwise let the SDK auto-manage.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| onComplete | Callback indicating whether the connection and authentication succeeded |
| forPlayerWithUlid | Optional: Execute the request for the specified player. If not supplied, the default player will be used. |
◆ ForceStopAllPresenceConnections()
| static void LootLocker.Requests.LootLockerSDKManager.ForceStopAllPresenceConnections |
( |
| ) |
|
|
inlinestatic |
Force stop all Presence WebSocket connections manually.
This will override the automatic presence management and disconnect all active connections. Use this when you need to immediately disconnect all presence connections.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
◆ ForceStopPresenceConnection()
| static void LootLocker.Requests.LootLockerSDKManager.ForceStopPresenceConnection |
( |
LootLockerPresenceCallback |
onComplete = null, |
|
|
string |
forPlayerWithUlid = null |
|
) |
| |
|
inlinestatic |
Force stop the Presence WebSocket connection manually.
This will override the automatic presence management and manually disconnect. Use this when you need precise control over presence connections, otherwise let the SDK auto-manage.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| onComplete | Optional callback indicating whether the disconnection succeeded |
| forPlayerWithUlid | Optional: Execute the request for the specified player. If not supplied, the default player will be used. |
◆ GetCurrentPresenceStatus()
| static string LootLocker.Requests.LootLockerSDKManager.GetCurrentPresenceStatus |
( |
string |
forPlayerWithUlid = null | ) |
|
|
inlinestatic |
Get the last status that was sent for a specific player.
NOTE: To use this the rich presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
- Returns
- The last sent status string, or null if no client is found or no status has been sent
◆ GetPresenceConnectionState()
Get the current Presence connection state for a specific player.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
- Returns
- The current connection state
◆ GetPresenceConnectionStats()
Get statistics about the Presence connection for a specific player.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
- Returns
- Connection statistics
◆ IsPresenceAutoConnectEnabled()
| static bool LootLocker.Requests.LootLockerSDKManager.IsPresenceAutoConnectEnabled |
( |
| ) |
|
|
inlinestatic |
Check if automatic presence connections are enabled.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Returns
- True if auto-connect is enabled, false otherwise
◆ IsPresenceAutoDisconnectOnFocusChangeEnabled()
| static bool LootLocker.Requests.LootLockerSDKManager.IsPresenceAutoDisconnectOnFocusChangeEnabled |
( |
| ) |
|
|
inlinestatic |
Check if automatic presence disconnection on focus change is enabled.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Returns
- True if auto-disconnect on focus change is enabled, false otherwise
◆ IsPresenceConnected()
| static bool LootLocker.Requests.LootLockerSDKManager.IsPresenceConnected |
( |
string |
forPlayerWithUlid = null | ) |
|
|
inlinestatic |
Check if Presence is connected and authenticated for a specific player.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
- Returns
- True if connected and active, false otherwise
◆ IsPresenceEnabled()
| static bool LootLocker.Requests.LootLockerSDKManager.IsPresenceEnabled |
( |
| ) |
|
|
inlinestatic |
Check if presence system is currently enabled.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Returns
- True if enabled, false otherwise
◆ ListPresenceConnections()
| static IEnumerable< string > LootLocker.Requests.LootLockerSDKManager.ListPresenceConnections |
( |
| ) |
|
|
inlinestatic |
Get a list of player ULIDs that currently have active Presence connections.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Returns
- Collection of player ULIDs that have active presence connections
◆ SetPresenceAutoConnectEnabled()
| static void LootLocker.Requests.LootLockerSDKManager.SetPresenceAutoConnectEnabled |
( |
bool |
enabled | ) |
|
|
inlinestatic |
Enable or disable automatic presence connection when sessions start.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| enabled | Whether to auto-connect presence |
◆ SetPresenceAutoDisconnectOnFocusChangeEnabled()
| static void LootLocker.Requests.LootLockerSDKManager.SetPresenceAutoDisconnectOnFocusChangeEnabled |
( |
bool |
enabled | ) |
|
|
inlinestatic |
Enable or disable automatic presence disconnection when the application loses focus or is paused.
When enabled, presence connections will automatically disconnect when the app goes to background and reconnect when it returns to foreground. Useful for saving battery on mobile or managing resources.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| enabled | True to enable auto-disconnect on focus change, false to disable |
◆ SetPresenceEnabled()
| static void LootLocker.Requests.LootLockerSDKManager.SetPresenceEnabled |
( |
bool |
enabled | ) |
|
|
inlinestatic |
Enable or disable the entire Presence system.
NOTE: To use this the presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| enabled | Whether to enable presence |
◆ UpdatePresenceStatus()
| static void LootLocker.Requests.LootLockerSDKManager.UpdatePresenceStatus |
( |
string |
status, |
|
|
Dictionary< string, string > |
metadata = null, |
|
|
Action< bool > |
onComplete = null, |
|
|
string |
forPlayerWithUlid = null |
|
) |
| |
|
inlinestatic |
Update the player's presence status.
NOTE: To use this the rich presence feature must be enabled for your game. Contact LootLocker support if you need assistance.
- Parameters
-
| status | The status to set (e.g., "online", "in_game", "away") |
| metadata | Optional metadata to include with the status |
| onComplete | Callback for the result of the operation |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |