Game ideas & features

Your next feature

Items

Unique equipment with properties, catalog rules and a clear player inventory.

SDK developRequires a player session
Unity
Illustration of Items
Your visible result

After saving, the catalog contains starter_sword. After the reviewed sample purchase, the current inventory contains its unique instanceId.

Video coming later

This step does not have a video yet. The guide and MCP request are ready to use.

Items

Prepare the same project

  1. Choose the same project in the dashboard as in your game configuration.

    Items →
  2. Create or reuse these test entries in the dashboard form. These are example values, not current project data.

    Key
    starter_sword
    Name
    Quickstart Sword
    Type
    equipment
    Rarity
    common
    Active
    true
    Base properties
    {"damage":5}
    Property rules
    []

    Items are individual objects with their own IDs and properties. Countable resources stay in Player Values; display cosmetics stay in Player Profile.

    Prepare coins using the Player Values guide. Then save an active offer starter-sword: cost 10 coins, item reward 1 starter_sword.

    Player values →
  3. Save, reload and verify the entries before running the example. Preserve unrelated definitions.

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed, project configuration imported and player signed in.

This SDK example uses develop. Check whether the required APIs exist in your installed SDK.

Complete the Quickstart connection with the intended player. Call ReadCatalogPage(), ReadInventory() from an explicit button or scene action. Opening the file alone sends no request.

C#
Assets/Scripts/ItemsDemo.cs
horizOn call
1using UnityEngine;
2using PM.horizOn.Cloud.Manager;
3​
4public sealed class ItemsDemo : MonoBehaviour
5{
6 // Initialize/connect and restore the existing player in the Quickstart first.
7 public async void ReadInventory()
8 {
9 var user = UserManager.Instance.CurrentUser;
10 if (user == null || !user.IsValid()) return;
11 var result = await ItemsManager.Instance.GetInventory(user.UserId);
12 if (!result.IsSuccess) { Debug.LogWarning(result.ErrorCode); return; }
13 foreach (var item in result.Data.instances)
14 Debug.Log($"{item.instanceId}: {item.itemKey}");
15 // Keep result.Data.revision for a separately reviewed mutation.
16 }
17​
18 // Wire a separate explicit action; no automatic catalog traversal or poll.
19 public async void ReadCatalogPage()
20 {
21 var user = UserManager.Instance.CurrentUser;
22 if (user == null || !user.IsValid()) return;
23 var result = await ItemsManager.Instance.GetCatalog(user.UserId, limit: 1);
24 if (!result.IsSuccess) { Debug.LogWarning(result.ErrorCode); return; }
25 Debug.Log($"Catalog revision: {result.Data.revision}");
26 // Explicit Next keeps result.Data.revision and nextAfterKey unchanged.
27 }
28}
29// SDK ItemsExample/ItemsSampleStore persist original instanceId/body/revision before writes.
30// Keep the original Player Values operationId for purchase recovery.
31// The initial success may include item references; retained replay may return empty applied/items.
32// Read the current inventory separately. Never reconstruct earlier item references.
33// A failed refresh never authorizes a replacement purchase or a local item grant.
Open the complete SDK sample ↗

Use the saved item

Import the official sample and its helpers. Review the offer, then run the sequence below with the existing player. Wait for each step and confirm the purchase once. Keep the original request after an uncertain response.

ItemsExample: projectId → ReadOneCatalogPage() → ReviewOffers() → SavePurchaseAfterReview("starter-sword") → RefreshInventory()

Test your new feature.

After saving, the catalog contains starter_sword. After the reviewed sample purchase, the current inventory contains its unique instanceId.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • GET/items
  • GET/items/catalog
  • POST/items/adjust
  • POST/items/equip
  • POST/items/discard
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.