Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayGamesPlatform.Instance.LoadScores returns old scores #2674

Open
PrometeoProduction opened this issue Aug 5, 2019 · 15 comments
Open

PlayGamesPlatform.Instance.LoadScores returns old scores #2674

PrometeoProduction opened this issue Aug 5, 2019 · 15 comments

Comments

@PrometeoProduction
Copy link

PrometeoProduction commented Aug 5, 2019

This is the code that I use:

PlayGamesPlatform.Instance.LoadScores(
            "CgkIvJ3e4_MWEAIQAQ",
            LeaderboardStart.PlayerCentered,
            100,
            LeaderboardCollection.Public,
            LeaderboardTimeSpan.AllTime,
            (data) =>
            {
                foreach(var score in data.Scores)
                {
                    Debug.Log(score.value + " - " + score.userID + " - " + score.leaderboardID);
                }
                
            });

When I load scores using the API (Social API or PlayGamesPlatform.Instance), I get out of date scores.

But, when I use ShowLeaderBoardUI() function instead, the scores are correct in the GUI.

Is this normal?

UPDATE EDIT:

The problem seems to be LeaderboardStart.PlayerCentered.

When I use PlayerCentered it returns old or wrong values, instead when I use LeaderboardStart.TopScores I get the right values.

Why does this happen?

@frolky
Copy link

frolky commented Aug 21, 2019

I confirm, PlayerCentered returns old scores

@ovieira
Copy link

ovieira commented Sep 10, 2019

LeaderboardStart.TopScores seems to return the highest score in the game from all players, should I filter to find the player's highscore? That sounds like an issue if the leaderboard contains a lot of entries

@exzizt
Copy link

exzizt commented Oct 3, 2019

LeaderboardStart.TopScores seems to return the highest score in the game from all players, should I filter to find the player's highscore? That sounds like an issue if the leaderboard contains a lot of entries

See #2740 I recently opened. There's also a bug where if you use PlayCentered it doesn't provide any paging, making it practically impossible to make a custom leaderboard UI starting from the PlayCentered part of the data.

@olehkuznetsov
Copy link
Contributor

Thanks for reporting. We are looking at it.

@zoranigic
Copy link

Any news on this issue? Thanks!

@habitoti
Copy link
Contributor

Same here, using 0.10.7. Any hint how this could be fixed maybe locally already before an official new version is released? I can successfully write a new score (also then shown on different device), however reading it back again locally will just deliver a previous value only. Opening the „stock“ leaderboard UI, though, will already show the new value. So I‘d suspect some internal caching to be a bit too sustainable...

@bazcat
Copy link

bazcat commented Apr 12, 2020

Same on 0.10.8, PlayerCentered returns old values.
Same thing also happens when using PlayGamesPlatform.Instance.ShowLeaderboardUI().

@exzizt
Copy link

exzizt commented Apr 12, 2020

@olehkuznetsov Any updates on this critical issue?

@kamiltonek
Copy link

kamiltonek commented Apr 12, 2020

In the BlueStack emulator PlayGamesPlatform.Instance.ShowLeaderboardUI() returns true values but in my phone return old values

@fr3qu3ncy-dev
Copy link

This breaks the entire plugin and is still not fixed after 1 damn year? Wow.

@yosifovdimitar
Copy link

Correct me if I'm wrong, but it seems that the "All times" is slow to update. When you check the score with "Today" filter on the Leaderboard GUI it displays the updated score, but the "All times" remains with the old one, so the issue may be the way "All times" is being updated, so they don't overburden their servers while collecting scores from, well, all time.

@mura94
Copy link

mura94 commented Sep 23, 2020

Any updates on this? Running into the same issue.

@matiosfree
Copy link

matiosfree commented Mar 12, 2023

Hey there. Is there any update?

UPD. Added a PR with the fix: #3228

matiosfree added a commit to matiosfree/play-games-plugin-for-unity that referenced this issue Mar 12, 2023
matiosfree added a commit to matiosfree/play-games-plugin-for-unity that referenced this issue Mar 12, 2023
@JokePenny
Copy link

Hey there. Is there any update?

UPD. Added a PR with the fix: #3228

Thanks! Your pull request helped me

@CraaazySteeeve
Copy link

I also want to say thank you @matiosfree. Going into the package and forcing the "forceReload" to be on, does resolve this issue!
I'm very grateful!

They should expose that variable as an option in the plugin itself.

DmiShib added a commit to DmiShib/play-games-plugin-for-unity that referenced this issue Jun 6, 2024
…ores'

# Conflicts:
#	Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests