C# Unity项目中的GameCenter
我正试图在我的unity项目中实现GameCenter。到目前为止,我已经在itunes connect上制作了一个应用程序,并设置了游戏中心和排行榜 下面的函数在unity的UI按钮中调用C# Unity项目中的GameCenter,c#,ios,unity3d,game-center,C#,Ios,Unity3d,Game Center,我正试图在我的unity项目中实现GameCenter。到目前为止,我已经在itunes connect上制作了一个应用程序,并设置了游戏中心和排行榜 下面的函数在unity的UI按钮中调用 public void ShowLeaderBoardGameCenter() { Social.Active.ReportScore (1, "55379413", success => { Debug.Log(success ? "Reported score succes
public void ShowLeaderBoardGameCenter()
{
Social.Active.ReportScore (1, "55379413", success => {
Debug.Log(success ? "Reported score successfully" : "Failed to report score");
});
Social.Active.ShowLeaderboardUI ();
}
它的工作发现显示在排行榜上,但分数不显示
我还为gamecenter创建了一个沙箱帐户,我目前正在使用它
在我的unity项目中,它说“未找到排行榜”?-希望你们能帮忙 试试这个
if (Social.localUser.authenticated)
{
#if UNITY_ANDROID
{
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI (leaderboard); // Show current (Active) leaderboard
}
#elif UNITY_IOS
{
GameCenterPlatform.ShowLeaderboardUI ("BallzBrickSmasher_Leaderboard", TimeScope.AllTime);
}
#endif
}