|
1 | 1 | # unity-sdk
|
2 |
| -Full documentation available here https://docs.lootlocker.io/unity-sdk/ |
| 2 | +Full documentation available here https://docs.lootlocker.io/getting-started/unity-tutorials |
3 | 3 |
|
4 |
| -## Installation |
| 4 | +## Install from Unity Package Manager (Recommended) |
5 | 5 |
|
6 |
| -The following steps outline how to install the LootLocker SDK into your Unity project. |
| 6 | +Before you start, make sure you have git installed on your computer. |
| 7 | +Open the Unity editor and navigate to the Package Manager by clicking on Window and then Package Manager. |
7 | 8 |
|
8 |
| -1. Download the latest Unity Package Release from the [Github](https://github.com/LootLocker/unity-sdk) repository or from the [Unity Asset Store](https://assetstore.unity.com/packages/slug/180099)**.** |
9 |
| -2. Double-click on the package or drag the package into your Unity scene to import it. |
10 |
| -3. LootLocker requires “Editor Coroutine” from the package manager to function properly. If you currently have this in your project you can click exit in the window that displays after importing. |
11 |
| - Note: If you imported from github release and not Unity. You might need to open the package manager and install "Editor Coroutine". Otherwise project might not compile. |
12 |
| -4. If you are importing the package into an already existing project, please untick the project settings so your settings are not overwritten. |
13 |
| -5. If you already have the package “JsonDotNet” or “NewtonJson” from the Unity Asset Store or Github, please untick the “Dependencies” folder |
14 |
| -6. Click import to complete the SDK installation |
| 9 | +Click on the + at the top of the Package Manager window and select Add package from git URL. |
15 | 10 |
|
16 |
| -**Note**: If you do not intend to use the Admin SDK, Unity Samples or Sample App, you can safely delete the folders within the LootLocker folder to reduce the size of the project. |
| 11 | +Enter the URL below into the text box and click Add. |
| 12 | +https://github.com/LootLocker/unity-sdk.git |
17 | 13 |
|
18 |
| -## Set Up |
| 14 | +The SDK is now installed in your project, and you are ready to configure the SDK and make your first API calls. |
19 | 15 |
|
20 |
| -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. |
| 16 | +## Configure the SDK |
21 | 17 |
|
22 |
| -The following steps walks you through configuring the LootLocker Unity SDK to work with a game that has been created in the LootLocker Management Console at [my.lootlocker.io](https://my.lootlocker.io) |
| 18 | +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. |
| 19 | +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 my.lootlocker.io or follow this guide. |
| 20 | +There are two methods for setting up the SDK: setting it up manually in the project settings in the editor or using the Admin SDK. This tutorial will explain both ways. |
| 21 | +### Configure via Project Settings |
| 22 | +Login to the LootLocker Management Console by visiting my.lootlocker.io. |
| 23 | +Click on Game Settings and copy your API Key. |
| 24 | +Return to the Unity Editor, Click on Edit, and then Project Settings. |
23 | 25 |
|
24 |
| -There are two methods for setting up the SDK: using the Admin SDK or by manually editing the config file. |
| 26 | +Click on LootLocker SDK in the list to the left and fill in your API Key copied from the LootLocker dashboard. |
25 | 27 |
|
26 |
| -### Using the Admin SDK |
27 |
| - |
28 |
| -The Admin SDK is provided as a simple tool to login to your LootLocker account and configure your Unity project to a game you have set up in the LootLocker Management Console. |
29 |
| - |
30 |
| -1. Navigate to the menu bar and select Window/Open LootLocker Admin Panel. |
31 |
| -2. Enter the email and password for your LootLocker account. If you do not have a LootLocker account you can create one by visiting [lootlocker.io/sign-up](https://www.lootlocker.io/sign-up). |
32 |
| -3. In the LootLocker Admin Panel, select the game you wish to use. |
33 |
| -4. In the Project view, navigate to LootLocker/Game/Resources/Config. |
34 |
| -5. Click on LootLockerConfig. |
35 |
| -6. Modify your the following: |
36 |
| - 1. Game Version e.g 1.0.0.0 |
37 |
| - 2. Platform e.g Android, Steam |
38 |
| - 3. Environment e.g Development |
39 |
| -You are now ready to use LootLocker and connect to your game's APIs. |
40 |
| - |
41 |
| -### Modifying the Config |
42 |
| - |
43 |
| -Alternatively, you can configure your Unity project manually by excluding the Admin SDK from the installation. |
44 |
| - |
45 |
| -1. Login to the LootLocker Management Console by visiting [my.lootlocker.io](https://my.lootlocker.io) |
46 |
| -2. Click on Settings |
47 |
| -3. Copy your Game Name and API Key |
48 |
| -4. Return to Unity |
49 |
| -5. In the Project view, navigate to LootLocker/Game/Resources/Config |
50 |
| -6. Fill in all information based on data from the LootLocker Settings Menu |
51 |
| - 1. Game Version e.g 1.0.0.0 |
52 |
| - 2. Platform e.g Android, Steam |
53 |
| - 3. Environment e.g Development |
54 |
| - |
55 |
| -You are now ready to use LootLocker and connect to your game's APIs. |
| 28 | +Fill in all information based on data from the LootLocker Settings Menu. |
| 29 | +API Key is found in Game Settings in the LootLocker Management Console. |
| 30 | +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). |
| 31 | +Platform is the name of the platform the game will be built for (e.g Steam, PSN, Android, iOS). |
| 32 | +Environment lets you test your unpublished changes in the LootLocker Management Console by selecting Development instead of Live. |
| 33 | +Current Debug Level allows you to configure the debug level of the SDK. This can be set to Errors Only, Normal Only, or Off. |
| 34 | +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. |
| 35 | +You have now configured the LootLocker SDK. In the next section you will learn how to make your first API calls. |
0 commit comments