Craftware Docs
  • What is Craftware?
    • Game Samples using Craftware
  • ❗Getting Started
  • SDKs
    • Unity3D SDK Guide
    • Golang SDK Guide
  • Blockchain Elements
    • Smart Contracts
    • ICraftableIn Library
  • 🎮Game Content
    • Game Assets
      • Resources
        • Create a resource
        • Retrieve Resources in Game
      • Currencies
      • Items
      • Properties
      • Export Assets Data
      • Import Assets Data
    • Crafting
      • Crafting Rule
  • 🤝Onchain Interoperability
    • Authentication
      • Wallet Binding
      • Wallet Session Authentication
      • Setting Up Wallet Authentication
    • Ports Protocol
      • Export Protocol
      • Import Protocol
    • Backward Compatibility
    • Crafting Protocol
      • Craftable Token
        • Definition Metadata
        • Craftable Input Token
        • Craftable Output Token
      • Crafting Rule Contract
        • Definition Metadata
      • Crafting Rule No-code Designer
  • ⚙️Admin
    • Account Settings
      • Account
      • Users
      • API Keys
      • Plan
      • Config
    • Security
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. Game Content
  2. Game Assets
  3. Resources

Retrieve Resources in Game

An installed SDK is required for the implementation of the following tutorial. To learn more about installing the Craftware SDK, please visit the page SDKs.

In this guide, you will learn how to retrieve the Resources data in your game, for example if you want to display it there.

LootLockerSDKManager.GetCollectables((response) =>
{
    if (response.success)
    {
        Debug.Log("Successfully received " + response.collectables.Length + " collectables");
    }
    else
    {
        Debug.Log("Error receiving collectables");
    }
});
LootLockerSDKManager.GetCollectables((response) =>
{
    if (response.success)
    {
        Debug.Log("Successfully received " + response.collectables.Length + " collectables");
    }
    else
    {
        Debug.Log("Error receiving collectables");
    }
});

For examples of live games using Craftware to retrieve their resources information, please visit the Game Samples using Craftwarepage.

PreviousCreate a resourceNextCurrencies

Last updated 1 year ago

Was this helpful?

🎮