Links

Implement Loot Box in Game

This requires you to have set up a Loot Box in the management interface.
Please refer to the guide on creating Loot Boxes for this

Open Loot Box

After the player has either purchased or have been awarded a loot box they can open it.
This will remove the loot box from their inventory and grant them the item from the loot box.
To see what items were granted by the Loot box you can use the Grant Notifications Method​
Unity
int assetInstanceID = 90;
LootLockerSDKManager.OpenALootBoxForAssetInstances(assetInstanceID, (response) =>
{
if (response.success)
{
Debug.Log("Successfully opened Loot box");
}
else
{
Debug.Log("Error opening Loot box");
}
});

Inspect Loot Box

Before opening a Loot Box we can inspect it to see what the player may get
Unity
int assetInstanceID = 90;
LootLockerSDKManager.InspectALootBoxForAssetInstances(assetInstanceID, (response) =>
{
if (response.success)
{
Debug.Log("Successfully inspected Loot box");
}
else
{
Debug.Log("Error inspecting Loot box");
}
});