LootLocker Unreal SDK 10.4.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
Presence

Detailed Description

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.

Typedef Documentation

◆ FLootLockerPresenceCallbackDelegate

typedef void(* FLootLockerPresenceCallbackDelegate) (bool, const FString &)

Delegate for handling presence connection process callbacks.

◆ FLootLockerPresenceConnectionDelegate

typedef void(* FLootLockerPresenceConnectionDelegate) (const FString &, ELootLockerPresenceConnectionState, ELootLockerPresenceConnectionState, const FString &)

Delegate for presence connection state changes.

Function Documentation

◆ ForceStartPresenceConnection()

static void ULootLockerSDKManager::ForceStartPresenceConnection ( const FLootLockerPresenceCallbackDelegate OnComplete,
const FString &  ForPlayerWithUlid = TEXT("") 
)
static

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
OnCompleteCallback indicating whether the connection and authentication succeeded
ForPlayerWithUlidOptional: Execute the request for the specified player. If not supplied, the default player will be used.

◆ ForceStopAllPresenceConnections()

static void ULootLockerSDKManager::ForceStopAllPresenceConnections ( )
static

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 ULootLockerSDKManager::ForceStopPresenceConnection ( const FLootLockerPresenceCallbackDelegate OnComplete,
const FString &  ForPlayerWithUlid = TEXT("") 
)
static

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
OnCompleteOptional callback indicating whether the disconnection succeeded
ForPlayerWithUlidOptional: Execute the request for the specified player. If not supplied, the default player will be used.

◆ GetCurrentPresenceStatus()

static FString ULootLockerSDKManager::GetCurrentPresenceStatus ( const FString &  ForPlayerWithUlid = TEXT(""))
static

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
ForPlayerWithUlidOptional: Execute the request for the specified player. If not supplied, the default player will be used.
Returns
The last sent status string, or empty if no client is found or no status has been sent

◆ GetPresenceConnectionState()

static ELootLockerPresenceConnectionState ULootLockerSDKManager::GetPresenceConnectionState ( const FString &  ForPlayerWithUlid = TEXT(""))
static

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
ForPlayerWithUlidOptional: Execute the request for the specified player. If not supplied, the default player will be used.
Returns
The current connection state

◆ GetPresenceConnectionStats()

static FLootLockerPresenceConnectionStats ULootLockerSDKManager::GetPresenceConnectionStats ( const FString &  ForPlayerWithUlid = TEXT(""))
static

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
ForPlayerWithUlidOptional: Execute the request for the specified player. If not supplied, the default player will be used.
Returns
Connection statistics

◆ IsPresenceAutoConnectEnabled()

static bool ULootLockerSDKManager::IsPresenceAutoConnectEnabled ( )
static

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 ULootLockerSDKManager::IsPresenceAutoDisconnectOnFocusChangeEnabled ( )
static

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 ULootLockerSDKManager::IsPresenceConnected ( const FString &  ForPlayerWithUlid = TEXT(""))
static

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
ForPlayerWithUlidOptional: 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 ULootLockerSDKManager::IsPresenceEnabled ( )
static

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 TArray< FString > ULootLockerSDKManager::ListPresenceConnections ( )
static

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
Array of player ULIDs that have active presence connections

◆ SetPresenceAutoConnectEnabled()

static void ULootLockerSDKManager::SetPresenceAutoConnectEnabled ( bool  bEnabled)
static

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
bEnabledWhether to auto-connect presence

◆ SetPresenceAutoDisconnectOnFocusChangeEnabled()

static void ULootLockerSDKManager::SetPresenceAutoDisconnectOnFocusChangeEnabled ( bool  bEnabled)
static

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
bEnabledTrue to enable auto-disconnect on focus change, false to disable

◆ SetPresenceEnabled()

static void ULootLockerSDKManager::SetPresenceEnabled ( bool  bEnabled)
static

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
bEnabledWhether to enable presence

◆ UpdatePresenceStatus()

static void ULootLockerSDKManager::UpdatePresenceStatus ( const FString &  Status,
const TMap< FString, FString > &  Metadata,
const FLootLockerPresenceCallbackDelegate OnComplete,
const FString &  ForPlayerWithUlid = TEXT("") 
)
static

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
StatusThe status to set (e.g., "online", "in_game", "away")
MetadataOptional metadata to include with the status
OnCompleteCallback for the result of the operation
ForPlayerWithUlidOptional: Execute the request for the specified player. If not supplied, the default player will be used.

Data Structures

struct  FLootLockerPresenceManagerConfig
 Configuration structure for presence manager behavior. More...
 
struct  FLootLockerCachedPresenceStatusUpdate
 
class  ULootLockerPresenceManager
 Manager for LootLocker presence functionality Coordinates presence connections for multiple players/sessions and provides lifecycle management through external event integration. More...
 

Typedefs

typedef void(* FLootLockerPresenceConnectionDelegate) (const FString &, ELootLockerPresenceConnectionState, ELootLockerPresenceConnectionState, const FString &)
 Delegate for presence connection state changes.
 
typedef void(* FLootLockerPresenceCallbackDelegate) (bool, const FString &)
 Delegate for handling presence connection process callbacks.
 

Functions

static void ULootLockerSDKManager::ForceStartPresenceConnection (const FLootLockerPresenceCallbackDelegate &OnComplete, const FString &ForPlayerWithUlid=TEXT(""))
 Force start the Presence WebSocket connection manually.
 
static void ULootLockerSDKManager::ForceStopPresenceConnection (const FLootLockerPresenceCallbackDelegate &OnComplete, const FString &ForPlayerWithUlid=TEXT(""))
 Force stop the Presence WebSocket connection manually.
 
static void ULootLockerSDKManager::ForceStopAllPresenceConnections ()
 Force stop all Presence WebSocket connections manually.
 
static TArray< FString > ULootLockerSDKManager::ListPresenceConnections ()
 Get a list of player ULIDs that currently have active Presence connections.
 
static void ULootLockerSDKManager::UpdatePresenceStatus (const FString &Status, const TMap< FString, FString > &Metadata, const FLootLockerPresenceCallbackDelegate &OnComplete, const FString &ForPlayerWithUlid=TEXT(""))
 Update the player's presence status.
 
static ELootLockerPresenceConnectionState ULootLockerSDKManager::GetPresenceConnectionState (const FString &ForPlayerWithUlid=TEXT(""))
 Get the current Presence connection state for a specific player.
 
static bool ULootLockerSDKManager::IsPresenceConnected (const FString &ForPlayerWithUlid=TEXT(""))
 Check if Presence is connected and authenticated for a specific player.
 
static FLootLockerPresenceConnectionStats ULootLockerSDKManager::GetPresenceConnectionStats (const FString &ForPlayerWithUlid=TEXT(""))
 Get statistics about the Presence connection for a specific player.
 
static FString ULootLockerSDKManager::GetCurrentPresenceStatus (const FString &ForPlayerWithUlid=TEXT(""))
 Get the last status that was sent for a specific player.
 
static void ULootLockerSDKManager::SetPresenceEnabled (bool bEnabled)
 Enable or disable the entire Presence system.
 
static bool ULootLockerSDKManager::IsPresenceEnabled ()
 Check if presence system is currently enabled.
 
static void ULootLockerSDKManager::SetPresenceAutoConnectEnabled (bool bEnabled)
 Enable or disable automatic presence connection when sessions start.
 
static bool ULootLockerSDKManager::IsPresenceAutoConnectEnabled ()
 Check if automatic presence connections are enabled.
 
static void ULootLockerSDKManager::SetPresenceAutoDisconnectOnFocusChangeEnabled (bool bEnabled)
 Enable or disable automatic presence disconnection when the application loses focus or is paused.
 
static bool ULootLockerSDKManager::IsPresenceAutoDisconnectOnFocusChangeEnabled ()
 Check if automatic presence disconnection on focus change is enabled.