Skip to content

Use Drop Table in Game

Get Drops From Drop Table

int dropTableInstanceID = 87;
LootLockerSDKManager.ComputeAndLockDropTable(dropTableInstanceID, (response) =>
{
if (response.success)
{
Debug.Log("Successfully computed drops: " + response.items.Length);
}
else
{
Debug.Log("Error computing drops");
}
});

Give Dropped Items To The Player

Using the IDs from the compute drops method we can give any of the drops to the player.

int dropTableInstanceID = 87;
int[] pickIDs = new int[] { 1 };
LootLockerSDKManager.PickDropsFromDropTable(pickIDs, dropTableInstanceID, (response) =>
{
if (response.success)
{
Debug.Log("Successfully computed drops: " + response.items.Length);
}
else
{
Debug.Log("Error computing drops");
}
});