LootLocker
The BasicsGame SystemsContent ManagementPlayer Management
LootLocker
  • 📌The Basics
    • Getting Started
    • What is LootLocker?
    • Core Concepts
      • Players
      • Assets
      • Character Classes
      • API Types
      • Web Console
      • Stage & Live Environments
      • Glossary
    • Unity Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • Unreal Quick Start
      • Install & Configure the SDK
        • Older versions
      • Authenticate Your First Player
    • Godot Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • SDKs
    • Samples
      • Authentication Samples
      • Leaderboard Samples
      • Progression Samples
      • Player Samples
    • Launching Your Game
    • Support
      • Error Codes
      • Unreal Marketplace Plugin Support
  • 🎭Players
    • Overview
    • Authentication
      • How To
        • Guest Login
        • Steam
        • Apple
        • Apple Game Center
        • Google
        • Epic Games
        • PlayStation
        • Meta / Oculus
        • Xbox
        • Nintendo Switch
    • Files
      • How To
        • Manage Files in Web Console
        • Work with Files In-Game
    • Inventory
      • How To
        • Work with Player Inventory
    • Messages
      • How To
        • Configure Messages in Web Console
    • Names
      • How To
        • Work with Player Names
    • Player Manager
      • How To
        • Manage Players through Web Console
        • Manage Players In-Game
        • Use Player Operations
    • Unified Player Accounts
      • How To
        • Configure UPA in Web Console
        • Use Remote Login In-Game
        • Connect Identiy Provider to Player
        • External Provider Linking
        • Transition from Guest Login to Other Provider
        • Disconnect Identity Provider from Player
    • White Label Login
      • How To
        • Configure White Label Login
        • Create a New White Label User
        • Request User Verification
        • Handle Returning Users
        • Start a White Label Session
  • 🪙Commerce
    • Overview
    • Catalogs
      • How To
        • Configure Catalogs in LootLocker Console
        • List all Catalogs
        • Use Catalogs In-Game
        • Setup In-Game Store
    • Currencies
      • How To
        • Configure a Currency in Web Console
        • Use Currencies In-Game
    • DLC Management
      • How To
        • Configure DLC in Web Console
        • Use DLC In-Game
    • Entitlements
      • How To
        • Work with Entitlements In-Game
    • Real Money Purchases
      • How To
        • Configure In-App Purchase in Web Console
        • Make Purchases through Google Play Store
        • Make Purchases through Apple Store
        • Make Purchases through Steam Store
    • Virtual Purchases
    • Wallets
      • How To
        • Manage a Wallet in Web Console
        • Use Wallets In-Game
  • ⚔️Content
    • Overview
    • Assets
      • How To
        • Create & Configure an Asset
        • Organize & Search for Assets
        • Retrieve Assets In-Game
        • Set up Asset Storage Template
        • Check Grant Notifications
        • Set up a Game Config Asset
        • Create a Loot Box
        • Work with Loot Boxes In-Game
        • Create a Drop Table
        • Work with Drop Tables In-Game
        • Create a Rental Asset
        • Work with Rental Assets In-Game
    • User Generated Content (UGC)
      • How To
        • Create UGC In-Game
    • Twitch Drops
  • 🕹️Game Systems
    • Overview
    • Classes & Heroes
      • How To
        • Base Classes
        • Hero Classes
        • Implement Classes In-Game
        • Implement Heroes In-Game
    • Leaderboards
      • How To
        • Configure Leaderboard in Web Console
        • Use Player Leaderboards
        • Use Generic Leaderboards
        • Use Metadata to Store Additional Information
        • Use Scheduled Reset with Rewards
        • Use Leaderboards for Time Based Rankings
      • Leaderboard FAQ
      • GameMaker References
    • Feedback
      • How To
        • Manage Feedback Categories
        • Create Player Feedback
        • Create UGC Feedback
        • Create Game Feedback
        • View and Manage Feedback
    • Progressions
      • How To
        • Create a Progression
        • Game Progressions
        • Player Progressions
        • Class Progressions
        • Asset Instance Progressions
    • Triggers
      • How To
        • Setup a trigger in the Web Console
        • Invoke trigger from game
  • ⛓️Shared Systems
    • Overview
    • Metadata
      • How To
        • Add Metadata in Console
        • Fetch a Single Metadata In-Game
        • Fetch Metadata In-Game by Tags
        • Fetch Metadata In-Game from Multiple Sources
    • Notifications
      • How To
        • List Notifications and Mark as Read In-Game
  • 🗝️Admin
    • Settings
    • User Settings
    • Organization Settings
    • CORS Allowlist
  • ⭕️ Legacy
    • Deprecations
      • Unity SDK Deprecation Log
        • Version 2.1.5 - Migration to Open UPM
        • Version 2.0.0
      • Unreal SDK Deprecation Log
        • Version 4.0.0
        • Version 3.0.0
    • Legacy Storage
    • Legacy Triggers
      • Activate a trigger
      • Create a trigger
    • Legacy Progressions
      • Create a Progression System
      • Use a Progression System In-Game
Powered by GitBook
On this page
  • Prerequisites
  • Get The Catalog Items
  • Conclusion
  1. Commerce
  2. Catalogs
  3. How To

Setup In-Game Store

PreviousUse Catalogs In-GameNextCurrencies

Last updated 5 months ago

In this how to, we will go through the steps of listing catalog items based on their kind in order to generate the correct UI elements that contains enough data to have an in-game store.

Prerequisites

  • A game created in the LootLocker web console

Get The Catalog Items

In order to create the UI of the store, we must gather all the information of what we're selling.

private void CreateStoreUI()
{
    string CatalogKey = "<INSERT KEY>";
    int count = 0;
    string after = null;

    LootLockerSDKManager.ListCatalogItems(CatalogKey, count, after, (response) =>
    {
        if (!response.success)
        {
            Debug.Log("Could not List Items from Catalog");
            return;
        }

        LootLockerInlinedCatalogEntry[] inlinedEntryList = response.GetLootLockerInlinedCatalogEntries();

        foreach (var entry in inlinedEntryList)
        {
            switch (entry.entity_kind)
            {
                case LootLockerCatalogEntryEntityKind.asset:
                    ConfigureAsset(entry.asset_details);
                    break;
                case LootLockerCatalogEntryEntityKind.currency:
                    ConfigureCurrency(entry.currency_details);
                    break;
                case LootLockerCatalogEntryEntityKind.progression_points:
                    ConfigureProgressionPoints(entry.progression_point_details);
                    break;
                case LootLockerCatalogEntryEntityKind.progression_reset:
                    ConfigureProgressionReset(entry.progression_reset_details);
                    break;
                case LootLockerCatalogEntryEntityKind.group:
                    ConfigureGroup(entry.group_details);
                    break;
            }
        }
    });
}

private void ConfigureAsset(LootLockerAssetDetails asset)
{
    Debug.Log(asset.name);
    Debug.Log(asset.id);
    Debug.Log(asset.thumbnail);
}

private void ConfigureCurrency(LootLockerCurrencyDetails currency)
{
    Debug.Log(currency.amount);
    Debug.Log(currency.name);
    Debug.Log(currency.id);
    Debug.Log(currency.code);
}

private void ConfigureProgressionPoints(LootLockerProgressionPointDetails progression)
{
    Debug.Log(progression.amount);
    Debug.Log(progression.name);
    Debug.Log(progression.id);
    Debug.Log(progression.key);
}

private void ConfigureProgressionReset(LootLockerProgressionResetDetails progression)
{
    Debug.Log(progression.name);
    Debug.Log(progression.id);
    Debug.Log(progression.key);
}

private void ConfigureGroup(LootLockerInlinedGroupDetails group)
{

    Debug.Log(group.name);
    Debug.Log(group.description);

    foreach (var asset in group.assetDetails)
    {
        ConfigureAsset(asset);
    }
    foreach (var currency in group.currencyDetails)
    {
        ConfigureCurrency(currency);
    }
    foreach (var progression in group.progressionPointDetails)
    {
        ConfigureProgressionPoints(progression);

    }
    foreach (var progression in group.progressionResetDetails)
    {
        ConfigureProgressionReset(progression);
    }
}

Firstly we will get a list of all catalog items. Afterwards we will use the custom function which the LootLocker SDK offers. Convert Catalog to Inline Items.

Once this is done, we must check which kind of item we're dealing with. For this we'll switch between the kind and iterate through the data.

Now you can take each individual detail and attach it to some UI to display a proper in-game store.

Conclusion

In this how to, we've received a list of catalog items, converted it into an inline list, which we can use to display all the items available for purchase. If you want to learn more about our , other important reads can be found in , and .

🪙
Atleast one catalog configured in the LootLocker web console
A player with an active LootLocker game session
Catalogs press here
Economy
Currencies
Wallets
Blueprint example of listing catalog items
Blueprint example of listing catalog items
Blueprint example of listing catalog items