将你的游戏连接到 horizOn
在下面选择一条路径,无需冗长的设置,几分钟即可上线。
在上面的示例中使用 https://horizon.pm 作为基础 URL。应用端点需要 X-API-Key。
/api/v1/app/user-management/signup匿名或邮箱方式创建玩家
/api/v1/app/user-management/signin玩家登录与会话校验
/api/v1/app/leaderboard/submit提交分数
/api/v1/app/cloud-save/save保存玩家数据
/api/v1/app/cloud-save/load加载玩家数据
/api/v1/app/remote-config/all读取所有实时配置值
/api/v1/app/user-feedback/submit收集玩家的错误报告和建议
在 Dashboard 中,然后进入 API Keys,创建账户级密钥,将其粘贴到你的 MCP 客户端配置中,然后向助手请求 SDK 快速入门或实时 API 操作。
{
"mcpServers": {
"horizOn": {
"command": "npx",
"args": ["-y", "horizon-mcp"],
"env": {
"HORIZON_ACCOUNT_API_KEY": "hzn_acc_YOUR_ACCOUNT_KEY",
"HORIZON_BASE_URL": "https://horizon.pm"
}
}
}
} 在 GitHub 上查看 MCP 服务器 Apple requires every iOS build that offers a third-party sign-in option to also offer Sign in with Apple (App Store Review Guideline 4.8). horizOn User Management supports Apple Sign-In natively.
查看完整 API 参考horizOn simpleServer 提供与 horizOn Cloud 功能集一致的 REST API。所有 endpoints 都需要 X-API-Key 请求头进行身份验证。
为什么选择 PHP?为了最大程度的简洁——horizOn 的主后端使用 Spring/Kotlin 实现企业级性能。Simple Server 特意使用 PHP 构建,让开发者能够轻松理解、修改和自托管。
在 GitHub 上查看SDK、插件与工具
将 horizOn 集成到你的游戏所需的一切。下载适合你喜爱引擎的 SDK,几分钟内即可上手。
SDK 资源
下载 SDK、插件,并获取适用于你的游戏引擎的文档。
Unity2
Unreal Engine2
Godot2
其他资源2
每个客户端每分钟限制为 10 次请求。请高效地设计你的 API 调用。
在本地缓存数据 在启动时加载所有配置 仅在成绩提升时提交分数 使用 useCache 参数 反复发送相同的请求 反复获取单个配置 每一帧都提交分数 始终绕过缓存
高效的启动模式: 启动时只加载你需要的内容,其余的交给缓存处理。
查看完整 API 参考有疑问或发现了 Bug?如果你有账户,可以在 Dashboard 中开一个工单,或使用 horizon.pm 上的访客工单表单。你也可以加入 Discord 社区以获得快速帮助。
提交支持工单HorizOn 实战演示
探索真实应用如何集成 HorizOn 功能来解决常见开发难题
移动购物清单应用
带云端同步的购物清单
一款移动购物清单应用——用户可以将清单保存到云端、接收优惠和折扣资讯,并在多个设备间无缝访问数据。
ShopSync
欢迎回来!
代码示例
// Register user with email
await UserManager.Instance.SignUpEmail(
"user@example.com",
"securePassword123",
"John Doe"
);
// Sign in existing user
await UserManager.Instance.SignInEmail(
"user@example.com",
"securePassword123"
);// Define shopping list structure
[System.Serializable]
public class ShoppingList
{
public List<string> Items;
public DateTime LastUpdated;
}
// Save list to cloud
var list = new ShoppingList {
Items = new List<string> { "Milk", "Eggs", "Bread" },
LastUpdated = DateTime.Now
};
await CloudSaveManager.Instance.SaveObject(list);
// Load from cloud
var saved = await CloudSaveManager.Instance.LoadObject<ShoppingList>();// Fetch latest deals and offers
var news = await NewsManager.Instance.LoadNews(limit: 5);
foreach (var deal in news)
{
Debug.Log($"{deal.Title}: {deal.Message}");
// Display in UI: "50% off milk this week!"
}# REST API Alternative
# Register user
POST https://horizon.pm/user/signup/email
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"email": "user@example.com",
"password": "securePassword123",
"displayName": "John Doe"
}
# Save cloud data
POST https://horizon.pm/cloud-save
Content-Type: application/json
X-API-Key: YOUR_API_KEY
Authorization: Bearer USER_TOKEN
{
"data": {
"items": ["Milk", "Eggs", "Bread"],
"lastUpdated": "2025-02-07T10:00:00Z"
}
} 为什么有效
非常适合需要用户账户和跨设备同步的消费类应用。Cloud Save 确保清单无缝同步,新闻系统让用户随时了解最新优惠,登录功能提供安全的账户管理。
汽车制造商审计应用
质量管控与合规
一款面向汽车审核员的企业级应用,使用可远程更新的检查清单执行质量检查,无需重新部署应用即可集中更新。
AutoCorp 质量管控
代码示例
// Secure login for auditor
await UserManager.Instance.SignInEmail(
"auditor@company.com",
"securePassword"
);
// Check authentication status
if (UserManager.Instance.IsSignedIn)
{
var user = UserManager.Instance.CurrentUser;
Debug.Log($"Auditor: {user.DisplayName}");
}// Load audit checklist from remote config
var checklistJson = await RemoteConfigManager.Instance.GetString(
"audit_checklist_v2",
defaultValue: "{}"
);
// Parse checklist
var checklist = JsonUtility.FromJson<AuditChecklist>(checklistJson);
// Load compliance rules (updated without app deployment)
bool requiresPhotos = await RemoteConfigManager.Instance.GetBool(
"photos_required",
true
);// Fetch compliance updates and audit changes
var updates = await NewsManager.Instance.LoadNews(limit: 10);
foreach (var update in updates)
{
// Display critical compliance changes
Debug.Log($"[{update.Title}] {update.Message}");
}# REST API Alternative
# Login
POST https://horizon.pm/user/signin/email
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"email": "auditor@company.com",
"password": "securePassword"
}
# Get remote config
GET https://horizon.pm/remote-config/audit_checklist_v2
X-API-Key: YOUR_API_KEY
Authorization: Bearer USER_TOKEN 为什么有效
非常适合需要安全认证和可更新配置的企业级应用。Remote Config 实现跨设备的检查清单即时更新,新闻系统广播合规变更,登录功能确保只有授权人员可以访问系统。
Steam Roguelike 游戏
Steam 上的独立游戏
一款 Steam 上的 Roguelike 游戏——零注册门槛、云端存档、远程游戏平衡调整,以及内置的 Bug 反馈系统。
DUNGEON DEPTHS
一场Roguelike冒险
代码示例
// No registration required - instant play
await UserManager.Instance.SignUpAnonymous("Player_" + Random.Range(1000, 9999));
// Token is cached automatically for session restore
if (UserManager.Instance.IsSignedIn)
{
Debug.Log("Ready to play!");
}// Load game balance values (updatable without patch)
int maxHealth = await RemoteConfigManager.Instance.GetInt("max_health", 100);
float enemyDamage = await RemoteConfigManager.Instance.GetFloat("enemy_damage", 15.0f);
bool eventActive = await RemoteConfigManager.Instance.GetBool("halloween_event", false);
// Apply to gameplay
player.MaxHealth = maxHealth;
enemy.Damage = enemyDamage;// Define save structure
[System.Serializable]
public class GameProgress
{
public int Level;
public int Gold;
public List<string> UnlockedCharacters;
}
// Save progress
var progress = new GameProgress {
Level = 12,
Gold = 5000,
UnlockedCharacters = new List<string> { "Knight", "Mage" }
};
await CloudSaveManager.Instance.SaveObject(progress);
// Load on startup
var saved = await CloudSaveManager.Instance.LoadObject<GameProgress>();// Bug report with automatic device info
await FeedbackManager.Instance.ReportBug(
title: "Crash in level 5",
message: "Game freezes when boss spawns"
);
// Feature request
await FeedbackManager.Instance.RequestFeature(
title: "New character class",
message: "Please add Necromancer class"
);# REST API Alternative
# Anonymous signup
POST https://horizon.pm/user/signup/anonymous
Content-Type: application/json
X-API-Key: YOUR_API_KEY
{
"displayName": "Player_1234"
}
# Get remote config
GET https://horizon.pm/remote-config/max_health
X-API-Key: YOUR_API_KEY
Authorization: Bearer USER_TOKEN
# Submit feedback
POST https://horizon.pm/feedback/bug
Content-Type: application/json
X-API-Key: YOUR_API_KEY
Authorization: Bearer USER_TOKEN
{
"title": "Crash in level 5",
"message": "Game freezes when boss spawns"
} 为什么有效
非常适合需要即时玩家入门和灵活平衡调整的游戏。匿名登录消除注册阻力,Remote Config 支持实时平衡调整,Cloud Save 保存游戏进度,反馈系统自动采集设备信息并收集 Bug 报告。