
柔軟なデータフォーマット
セーブデータはプレーン文字列なので、JSON、MessagePack、独自フォーマットなど、スキーマの制約なく任意の構造をシリアライズできます。
即座にクロスデバイス同期
プレイヤーが horizOn アカウントで認証すると、最新のセーブデータがどのデバイスからでも即座に利用可能になります。
プレイヤーリテンション向上
進行状況が安全に保存されていると知っているプレイヤーは、デバイスの切り替えや再インストール後も高い確率で復帰します。
クイック統合
Puzzle Quest
レベル 47
Progress73%
スコア:128,450
プレイ時間:12 時間 34 分
// Unity C#: Cloud Saves (needs a signed in player)
using PM.horizOn.Cloud.Manager;
using UnityEngine;
[System.Serializable]
public class PlayerSave { public int Level; public int Gold; public string Checkpoint; }
// Save: the object is stored as JSON
var save = new PlayerSave { Level = 42, Gold = 1500, Checkpoint = "world_3_boss" };
bool saved = await CloudSaveManager.Instance.SaveObject(save);
// Load it again, e.g. on another device (null when nothing is saved)
var loaded = await CloudSaveManager.Instance.LoadObject<PlayerSave>();
if (loaded != null) Debug.Log($"Loaded level: {loaded.Level}");# REST API: Cloud Saves (needs the player's session token)
# Save player data
curl -X POST https://horizon.pm/api/v1/app/cloud-save/save \
-H "X-API-Key: YOUR_API_KEY" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"saveData":"{\"level\":42,\"gold\":1500,\"checkpoint\":\"world_3_boss\"}"}'
# Load player data
curl -X POST https://horizon.pm/api/v1/app/cloud-save/load \
-H "X-API-Key: YOUR_API_KEY" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'これらの例では、Unity SDK(C#)とREST APIを使っています。GodotとUnrealでも、それぞれのSDKで同じ呼び出しができます: クイックスタートを参照
