- Home /
Question by
monserboy · Nov 20, 2014 at 11:14 AM ·
googlestopleaderboardcross-platform
Stopping Google play leaderboards loading during load
I've implemented the official Google Play game services plugin into my game and managed to show a loading icon whenever the user presses the button to upload his/her score.
However I also want to implement a stop button into my game to stop loading the google leaderboards.
How do I program something like that? In the current plugin code isn't a funtion/method to stop the call to the server.
Link to official Google Play game services plugin: https://github.com/playgameservices/play-games-plugin-for-unity
Current loading script:
if (Social.localUser.authenticated == true) {
Social.ReportScore(Score.localScore, "LeaderboardsCode", (bool success) => {
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI("LeaderboardsCode");
loadingObject.SetActive(false);
EnableAllChilds();
});
} else {
Social.localUser.Authenticate((bool success) => {
Social.ReportScore(Score.localScore, "LeaderboardsCode", (bool reportSuccess) => {
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI("LeaderboardsCode");
loadingObject.SetActive(false);
EnableAllChilds();
});
});
}
Thanks for the help in advance!
Comment