Skip to content

Guest Login

Guest Login gives a player a simple, reusable session without requiring a username, password, or first-party platform account. Use it when you want players into your game as quickly as possible, or during development before you've settled on a target platform.

Prerequisites

  • Unity, Unreal, or Godot SDK installed and configured in your project (not required for REST).

Register a Session

Start a Guest Login session to register the player and receive a session token.

Create a new empty GameObject in your scene named GameManager (skip this if you already have one), then add a new script to it called GameManager.

Create new script on GameObject

Open up your new script in your editor of choice and add the following code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LootLocker.Requests;
public class GameManager : MonoBehaviour
{
void Start()
{
LootLockerSDKManager.StartGuestSession((response) =>
{
if (!response.success)
{
Debug.Log("error starting LootLocker session");
return;
}
Debug.Log("successfully started LootLocker session");
});
}
}

Run your game and check the console for the success message to confirm the session started correctly.

Conclusion

You've started using LootLocker in your game with Guest Login. Next, review LootLocker's full feature set to decide which other features to implement.