Install & Configure the SDK

Installing and configuring the LootLocker SDK in your Unity project only takes a few minutes.

Install the SDK

Installing the LootLocker SDK in your project is very straightforward and flexible with different ways to set it up depending on your personal preferences. Once you have downloaded the SDK, follow these steps to install the LootLocker SDK into your Unity project.

The Unity SDK can be installed through the Unity Package Manager or directly by importing the package into your Unity scene. We recommend using the Unity Package Manager.

Install Using Git

Before you start, make sure you have Git installed on your computer.

Open the Unity editor and navigate to the Package Manager by clicking on Window and then Package Manager.

Click on the + at the top of the Package Manager window and select Add package from git URL.

Enter the URL below into the text box and click Add.

https://github.com/LootLocker/unity-sdk.git

The SDK is now installed in your project, and you are ready to configure the SDK and make your first API calls.

Install Using the Entire Repo

If you do not have git installed on your computer you can install the SDK by downloading the entire repository and copying it into the packages folder of your project.

To download the entire repo, by select Code and Download Zip from the LootLocker Unity SDK GitHub page.

Install from Git Release

Double-click on the SDK package or drag the package into your Unity scene to import it.

If you are importing the package into an already existing project, make sure you untick the project settings so your settings are not overwritten.

If you already have the package JsonDotNet or NewtonJson from the Unity Asset Store or Github, untick the Dependencies folder.

Click Import to complete the SDK installation.

The SDK is now installed in your project, and you are ready to configure the SDK and make your first API calls.

Configure the SDK

It’s time to connect the SDK in your project to the LootLocker Management Console. Depending on the game engine, there might be different ways to achieve this, so make sure you read everything before getting started.

Now that you have installed the SDK into your Unity project, you will want 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 Project Settings

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

Click on Game Settings 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 go 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