Set up and configure the SDK before starting a session.
Call LootLockerSDKManager.Init() once at game startup, or rely on the LootLocker Settings asset configured in Edit → Project Settings → LootLocker SDK./// See the LootLocker documentation.
◆ CheckInitialized()
| static bool LootLocker.Requests.LootLockerSDKManager.CheckInitialized |
( |
bool |
skipSessionCheck = false, |
|
|
string |
forPlayerWithUlid = null |
|
) |
| |
|
inlinestatic |
Utility function to check if the sdk has been initialized.
- Parameters
-
| skipSessionCheck | Optional : When true, skips the check for an active session token. Useful when calling SDK methods that don't require a session. |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
- Returns
- True if initialized, false otherwise.
◆ Init()
| static bool LootLocker.Requests.LootLockerSDKManager.Init |
( |
string |
apiKey, |
|
|
string |
gameVersion, |
|
|
string |
domainKey, |
|
|
LootLockerLogger::LogLevel |
logLevel = LootLockerLogger::LogLevel::Info, |
|
|
bool |
logInBuilds = false, |
|
|
bool |
errorsAsWarnings = false, |
|
|
bool |
allowTokenRefresh = true, |
|
|
bool |
prettifyJson = false, |
|
|
bool |
obfuscateLogs = true, |
|
|
bool |
enablePresence = false, |
|
|
bool |
enablePresenceAutoConnect = true, |
|
|
bool |
enablePresenceAutoDisconnectOnFocusChange = false, |
|
|
bool |
enablePresenceInEditor = true |
|
) |
| |
|
inlinestatic |
Manually initialize the SDK.
- Parameters
-
| apiKey | Find the Game API-key at https://console.lootlocker.com/settings/api-keys and click on the API-tab |
| gameVersion | The current version of the game in the format 1.2.3.4 (the 3 and 4 being optional but recommended) |
| domainKey | Extra key needed for some endpoints, can be found by going to https://console.lootlocker.com/settings/api-keys and click on the API-tab |
| logLevel | What log level to use for the SDKs internal logging |
| logInBuilds | If true, logs will also be printed in builds. If false, logs will only be printed in the editor. |
| errorsAsWarnings | If true, errors will be logged as warnings instead of errors. |
| allowTokenRefresh | If true, the SDK will attempt to refresh tokens automatically. |
| prettifyJson | If true, JSON logs will be prettified. |
| obfuscateLogs | If true, sensitive information in logs will be obfuscated. |
| enablePresence | If true, presence features will be enabled. |
| enablePresenceAutoConnect | If true, presence will auto-connect. |
| enablePresenceAutoDisconnectOnFocusChange | If true, presence will auto-disconnect on focus change. |
| enablePresenceInEditor | If true, presence will be enabled in the editor. |
- Returns
- True if initialized successfully, false otherwise
|
| static bool | LootLocker.Requests.LootLockerSDKManager.Init (string apiKey, string gameVersion, string domainKey, LootLockerLogger.LogLevel logLevel=LootLockerLogger.LogLevel.Info, bool logInBuilds=false, bool errorsAsWarnings=false, bool allowTokenRefresh=true, bool prettifyJson=false, bool obfuscateLogs=true, bool enablePresence=false, bool enablePresenceAutoConnect=true, bool enablePresenceAutoDisconnectOnFocusChange=false, bool enablePresenceInEditor=true) |
| | Manually initialize the SDK.
|
| |
| static bool | LootLocker.Requests.LootLockerSDKManager.CheckInitialized (bool skipSessionCheck=false, string forPlayerWithUlid=null) |
| | Utility function to check if the sdk has been initialized.
|
| |