
玩家数值
在服务器上管理货币和能量。
SDK 与 REST
与 Unity、Godot 或 Unreal 集成,或使用 REST 接口。
项目控制台
在项目中配置各项功能并管理当前数据。
快速集成
玩家数值
视频即将上线
由服务器管理的货币、计数和能量。为每个项目定义余额、优惠和经过校验的变更。
using PM.horizOn.Cloud.Manager;
using UnityEngine;
var userId = UserManager.Instance.CurrentUser.UserId;
var current = await PlayerValuesManager.Instance.GetState(userId);
if (!current.IsSuccess) { Debug.LogWarning(current.ErrorCode); return; }
foreach (var value in current.State.values) Debug.Log(value.key + "=" + value.balance);
// This minimal first call reads authoritative balances, never a local reward delta.
// For purchases and original retry, import PlayerValuesExample and its
// PendingPlayerValuesPurchase helper from the official SDK samples.
// Persist the complete original user/offer/operationId before one send.
// An uncertain or expired original must never become a fresh purchase ID.这些示例使用 Unity SDK(C#)和 REST API。Godot 和 Unreal 在各自的 SDK 中有相同的调用: 参见快速入门
