playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 966 forks source link

Can't get back full score from leaderboard #1706

Open Honikou opened 7 years ago

Honikou commented 7 years ago

Hi,

I have 2 phones, Nexus 6 (android 6.0) and Nexus 6p (Android 7.1.2).

   ILeaderboard lb = PlayGamesPlatform.Instance.CreateLeaderboard();
    lb.id = GetBackLevelID(level);
    lb.timeScope = TimeScope.AllTime;
    lb.userScope = UserScope.Global;
    lb.LoadScores(ok =>
    {
        if (ok)
        {
            text.text = "...";
            LoadUsersAndDisplay(lb);
        }
        else
        {
            text.text = "Error retrieving leaderboardi";
            Debug.Log("Error retrieving leaderboardi");
        }
    });

The result is different on each phone.

Nexus 6 (android 6.0) I have all score

Nexus 6p (Android 7.1.2) I have only one and not mine.

Then when I parse data I have only 1 score on nexus 6p while I have 14 on nexus 6.

All account have the same configuration with all data public.

Honikou commented 7 years ago

Problem solve with

 PlayGamesPlatform.Instance.LoadScores(
           GetBackLevelID(level),
            LeaderboardStart.TopScores,
            100,
            LeaderboardCollection.Public,
            LeaderboardTimeSpan.AllTime,
            (data) =>
            {
                text.text = "...";
                LoadUsersAndShow(data);
            });

That mean that "PlayGamesPlatform.Instance.CreateLeaderboard();" doesn't work well for me.

I also try to ad lb.range = new Range(0, 14); But the result was the same.