
一次调用提交分数
通过一个 SDK 方法提交玩家分数,horizOn 自动处理排名、去重和持久化存储。
上下文排名
获取全球榜首或某位玩家周围的排名数据,让他们随时了解自己的名次。
零基础设施
horizOn 负责所有存储、索引和查询性能优化,你无需接触任何数据库。
快速集成
歌曲完成!
你的分数
12,450
// Unity C#: Leaderboard (board "weekly" created in the dashboard)
using PM.horizOn.Cloud.Manager;
using UnityEngine;
var board = LeaderboardManager.Instance;
// Submit a score for the signed in player (only kept if it beats their best)
await board.SubmitScore(15000, boardKey: "weekly");
// Top 10 (null on failure)
var top = await board.GetTop(10, boardKey: "weekly");
if (top != null)
{
foreach (var entry in top)
Debug.Log($"#{entry.position} {entry.username}: {entry.score}");
}
// Five entries above and below the player
var around = await board.GetAround(5, boardKey: "weekly");这些示例使用 Unity SDK(C#)和 REST API。Godot 和 Unreal 在各自的 SDK 中有相同的调用: 参见快速入门




