Use Drop Table in Game
To learn more about Drop Tables in general, see our page on Creating Drop Tables

Get Drops From Drop Table

Unity
1
int dropTableInstanceID = 87;
2
LootLockerSDKManager.ComputeAndLockDropTable(dropTableInstanceID, (response) =>
3
{
4
if (response.success)
5
{
6
Debug.Log("Successfully computed drops: " + response.items.Length);
7
}
8
else
9
{
10
Debug.Log("Error computing drops");
11
}
12
});
Copied!

Give Dropped Items To The Player

Using the IDs from the compute drops method we can give any of the drops to the player.
Untiy
1
int dropTableInstanceID = 87;
2
int[] pickIDs = new int[] { 1 };
3
LootLockerSDKManager.PickDropsFromDropTable(pickIDs, dropTableInstanceID, (response) =>
4
{
5
if (response.success)
6
{
7
Debug.Log("Successfully computed drops: " + response.items.Length);
8
}
9
else
10
{
11
Debug.Log("Error computing drops");
12
}
13
});
Copied!
Last modified 2mo ago