Configure the SDK

Now that you have installed the SDK into your Unity project, you need to connect the Unity project to your game in the LootLocker Management Console. The following steps walk you through configuring the LootLocker Unity SDK to work with a game that has already been created in the LootLocker Management Console. If you haven’t created a game or account yet, please visit our account creation page.

Configure via the LootLocker Unity Extension (Unity v2021.3+)

Open up the LootLocker Unity extension (you can find it under the Window menu in Unity's top bar). When that opens up, login with the account that you use to log in to the LootLocker Management Console.

Select the game that your Unity Project is for.

And now finally select the API key that you want to use. Remember to make sure in the top right corner that you are on the right environment.

Note that if your game project is older then you may still have legacy API Keys. They will not be selectable and clearly marked in the API Key selection list.

Configure via Project Settings

Login to the LootLocker Management Console by visiting the Web Console.

Go to Game Settings/API Keys and copy your API Key.

Return to the Unity Editor, Click on Edit, and then Project Settings.

Click on LootLocker SDK in the list to the left and fill in your API Key copied from the LootLocker dashboard. If the key does not begin with the environment you want to use (dev_ or prod_) you will need to generate a new one for the environment you want to integrate towards.

Fill in all information based on data from the LootLocker Settings Menu.

  • Domain Key is found in Game Settings in the LootLocker Web Console.

  • API Key is found in Game Settings in the LootLocker Web Console. Make sure to use the API key matching the environment you want to connect to. You can read more about that here. The API Key will be blurred out in the web console, so to copy it you need to press reveal <environment> key.

  • Game Version refers to the current version of the game in the format 1.2.3.4 (the 3 and 4 being optional but recommended).

  • Current Debug Level allows you to configure the debug level of the SDK. This can be set to Errors Only, Normal Only, or Off.

  • Allow Token Refresh can be selected so that the SDK automatically attempts to refresh the session token if it expires. Otherwise the session token needs to be renewed manually.

Deprecated properties

  • Platform is the name of the platform the game will be built for (e.g Steam, PSN, Android, iOS). This property has been deprecated and instead of using this you should call the StartSession method for the platform you want to use.

  • OnDevelopmentMode lets you test your unpublished changes in the LootLocker Management Console by selecting Development (true) instead of Live (false). This property has been deprecated, instead use the corresponding api key. Stage keys begin with dev_ and Live keys begin with prod_.

You have now configured the LootLocker SDK. In the next section you will learn how to make your first API calls.

Last updated