play-games-plugin-for-unity
play-games-plugin-for-unity copied to clipboard
After successfully ReportScore, method LoadScores return null PlayerScore
First I successful login in Google Play games:
PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
internal void ProcessAuthentication(SignInStatus status)
{
signInStatus = status;
if (signInStatus == SignInStatus.Success) // Calback return Success
{
SynchronizeUserScore();
OnAuthStateChanged?.Invoke();
}
}
I try to save a score to Google Play games:
PlayGamesPlatform.Instance.ReportScore(score, LEADERBOARD_SCORES, async isReported =>
{
Debug.Log($"Report score return {isReported}"); // Calback return true
}
Then I try to load the saved score:
PlayGamesPlatform.Instance.LoadScores(
leaderboardId: LEADERBOARD_SCORES,
start: LeaderboardStart.PlayerCentered,
rowCount: 1,
collection: LeaderboardCollection.Public,
timeSpan: LeaderboardTimeSpan.AllTime,
callback: data =>
{
Debug.Log($"Valid: {data.Valid}"); // Always true
Debug.Log($"PlayerScore: {data.PlayerScore}"); // Always null
});
I could not get the right score, I always get the PlayerScore null.
To Reproduce Steps to reproduce the behavior:
- Install unity 2021.3.22f1
- Install Google Play Games plugin
GooglePlayGamesPlugin-0.11.01.unitypackage
- Run code above
Versions
- Unity version: 2021.3.22f1
- Google Play Games Plugin for Unity version: 0.11.01
Additional context I tested authentication on couple devices and Google accounts. Authentication always return SignInStatus.Success. I can get other players results, but I always get empty PlayerScore if user never played in my game. This issue started after update to 0.11.01.