Retrieve Collectable Data in Game
The following tutorial assumes you have already set up your game and made your first API calls. To learn how to do that, visit the Getting Started guide.

Retrieve List of Collectables

Unity
1
LootLockerSDKManager.GettingCollectables((response) =>
2
{
3
if (response.success)
4
{
5
Debug.Log("Successfully received " + response.collectables.Length + " collectables");
6
}
7
else
8
{
9
Debug.Log("Error receiving collectables");
10
}
11
});
Copied!

Trigger Collectable

Unity
1
LootLockerSDKManager.CollectingAnItem("Cute_Kitten_Found.Some_group.First", (response) =>
2
{
3
if (response.success)
4
{
5
Debug.Log("Successfully triggered collectable");
6
}
7
else
8
{
9
Debug.Log("Error triggering collectable");
10
}
11
});
Copied!
Last modified 1mo ago