
アイテム
アイテムを一度定義し、各プレイヤーの所持品を管理します。
SDK と REST
Unity、Godot、Unreal と統合するか、REST インターフェースを使えます。
プロジェクトのダッシュボード
プロジェクトで各機能を設定し、現在のデータを管理できます。
クイック統合
アイテム
動画は近日公開
選択したプロジェクトの個別装備、プロパティ、カタログ規則とインベントリを管理します。
using UnityEngine;
using PM.horizOn.Cloud.Manager;
public sealed class ItemsDemo : MonoBehaviour
{
// Initialize/connect and restore the existing player in the Quickstart first.
public async void ReadInventory()
{
var user = UserManager.Instance.CurrentUser;
if (user == null || !user.IsValid()) return;
var result = await ItemsManager.Instance.GetInventory(user.UserId);
if (!result.IsSuccess) { Debug.LogWarning(result.ErrorCode); return; }
foreach (var item in result.Data.instances)
Debug.Log($"{item.instanceId}: {item.itemKey}");
// Keep result.Data.revision for a separately reviewed mutation.
}
// Wire a separate explicit action; no automatic catalog traversal or poll.
public async void ReadCatalogPage()
{
var user = UserManager.Instance.CurrentUser;
if (user == null || !user.IsValid()) return;
var result = await ItemsManager.Instance.GetCatalog(user.UserId, limit: 1);
if (!result.IsSuccess) { Debug.LogWarning(result.ErrorCode); return; }
Debug.Log($"Catalog revision: {result.Data.revision}");
// Explicit Next keeps result.Data.revision and nextAfterKey unchanged.
}
}
// SDK ItemsExample/ItemsSampleStore persist original instanceId/body/revision before writes.
// Keep the original Player Values operationId for purchase recovery.
// The initial success may include item references; retained replay may return empty applied/items.
// Read the current inventory separately. Never reconstruct earlier item references.
// A failed refresh never authorizes a replacement purchase or a local item grant.この SDK サンプルは develop を使用します。必要な API がインストール済みの SDK にあるか確認してください。 クイックスタートを参照
