Listing the available Catalogs for your game can be a good way of making sure the Catalogs you're going to use, are available.
Prerequisites
Before we can list the catalogs, please ensure you have completed the following steps beforehand:
- A game created in the LootLocker web console
- Catalogs configured in the LootLocker web console
- A player with an active LootLocker game session
In-game implementation
LootLockerSDKManager.ListCatalogs((response) =>{ if (!response.success) { Debug.Log("Could not List Catalogs"); return; }
foreach(var catalog in response.catalogs) { Debug.Log(catalog.name); Debug.Log(catalog.key); Debug.Log(catalog.id); }});
curl -X GET 'https://api.lootlocker.io/game/catalogs/' \-H 'x-session-token: {token}' \-H "Content-Type: application/json"Conclusion
In this how to, we have set up a way for you to list all your available catalogs, at this point, you can sort the catalogs, set up UI for a store, and more.
