I want to show leaderboard score directly as player press on leaderboard icon as like this:
When I was showing a leaderboard it just displaying, list of leaderboard. I want to see actual score directly.
Here is my code:
public void ShowLeaderboard ()
{
if (Social.localUser.authenticated)
Social.ShowLeaderboardUI ();
else {
// authenticate user:
Social.localUser.Authenticate ((bool success) => {
// handle success or failure
if (success) {
Debug.Log ("Login Success....");
PostHighScoreOnLeaderBoard();
Social.ShowLeaderboardUI ();
} else {
Debug.Log ("Login Failed....");
}
});
}
}
How can I show directly a players score?
If you would like the show the user's score directly like in your first image, you need to call PlayGamesPlatform.Instance.ShowLeaderboardUI("leaderboard_id") with the leaderboard ID passed in instead of Social.ShowLeaderboardUI().