Guest Login
If you're not using any specific first party platform or just want something simple, you can use our Guest Login feature to create player sessions.
This provides the player with a simple re-usable session which supports most of LootLockers features, with the exception of platform specific features such as payments through Steam etc.

Register a Session

Unity
Unreal
This requires that you have set up the Unity SDK in your game.
We'll start by creating a new empty Game Object in your scene and calling it GameManager. Feel free to skip this if you already have a GameManager or similar in your game.
Then in this new GameObject you can add a new script called GameManager
Open up your new script in your editor of choice and add the following code.
1
using System.Collections;
2
using System.Collections.Generic;
3
using UnityEngine;
4
using LootLocker.Requests;
5
6
public class GameManager : MonoBehaviour
7
{
8
void Start()
9
{
10
LootLockerSDKManager.StartGuestSession((response) =>
11
{
12
if (!response.success)
13
{
14
Debug.Log("error starting LootLocker session");
15
16
return;
17
}
18
19
Debug.Log("successfully started LootLocker session");
20
});
21
}
22
}
23
Copied!
To confirm that everything is running without errors, you can start your game and check the console for the correct Debug.Log message.
Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our feature set, and decide which ones you want to use in your game.
If you want to store your player’s inventory with LootLocker (this allows use of a lot more features, such as granting assets to players on level up, when completing a mission, etc) a great next step is to read up on the Asset Manager.
Guest Login have not yet been implemented in our Unreal SDK, but can be used by using our API directly.
If you need this feature, please let us know on our Discord server.
Last modified 20d ago
Copy link