GameKit是苹果提供的一套游戏开发框架,提供了一些游戏开发中常用的功能,如成就、排行榜、多人游戏等。 本插件中的函数主要用于补充Unity自带GameCenter的不足,不包含完整功能,除非后续添加。
建议在Unity中编写脚本以在打包Xcode时自动配置
void ShowGameCenterView(Action gameCenterViewControllerDidFinish = null)
显示Game Center界面
gameCenterViewControllerDidFinish
void LoadScore(string leaderboardID, Action<long> callback)
加载指定排行榜当前用户的分数,Unity自带的排行榜函数无法获取循环(Recurring)排行榜的分数,通过此方法可以获取
leaderboardID
callback
计时Recurring排行榜在iOS14以下不支持,会返回-1
There was an error while loading. Please reload this page.