We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using LoadScores with SetUserFilter the scores list returns empty:
var leaderboard = Social.CreateLeaderboard(); leaderboard.id = "leaderboard id"; leaderboard.SetUserFilter(new string[] { Social.localUser.id }); leaderboard.LoadScores(success => { if (success) Debug.Log($"Scores: {leaderboard.scores.Length}"); });
The Debug.Log line will always write"Scores: 0".
The text was updated successfully, but these errors were encountered:
The code block that is causing the error is this one:
if (fid.Equals(score.userID)) { return mScoreList.Count; }
If the scores' userID is equal to any on the list the AddScore method is returning before adding the score to the list.
userID
AddScore
The code below fixes the problem:
internal int AddScore(PlayGamesScore score) { if (mFilteredUserIds == null || mFilteredUserIds.Length == 0) { mScoreList.Add(score); } else { foreach (string fid in mFilteredUserIds) { if (fid.Equals(score.userID)) { mScoreList.Add(score); break; } } } return mScoreList.Count; }
Sorry, something went wrong.
Can you create a pull request with this change please?
28672eb
I think this Function call returns only last 20 Leaderboard enteries instead of returning all enteries.
No branches or pull requests
When using LoadScores with SetUserFilter the scores list returns empty:
The Debug.Log line will always write"Scores: 0".
The text was updated successfully, but these errors were encountered: