Reputation: 91
I am building a game for Android and iOS with Unity, and I have imported this: https://github.com/playgameservices/play-games-plugin-for-unity
I have created the game at the Google play Console, and I see my leaderboard. No data is uploaded however - even tho I have ran my code several times - first time was about 4 days ago. But still, no data is there.
I am able to log in successfully.
I am nor able to show the Leaderboard, which I would like to.
if(GUI.Button(new Rect (Screen.width/2 - 105*u, Screen.height/3 + 450*u, 210*u, 210*u), "Score")){
// Activate the Google Play Games platform
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
Social.localUser.Authenticate((bool success) => {});
Social.ReportScore(PlayerPrefs.GetInt ("best"), "CxxxxQ", (bool s) => {});
((PlayGamesPlatform) Social.Active).ShowLeaderboardUI("CxxxxQ");
}
Upvotes: 2
Views: 3864
Reputation: 56
using google.service.game;
GoogleGame.Instance().login (true, false);
GoogleGame.Instance().showLeaderboards();
Upvotes: 1