Skip to content

Instantly share code, notes, and snippets.

@Raziel619
Created September 14, 2019 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raziel619/9a0fda335b4da991343e5e31dd9da28f to your computer and use it in GitHub Desktop.
Save Raziel619/9a0fda335b4da991343e5e31dd9da28f to your computer and use it in GitHub Desktop.
Playfab GetTop20Leaderboard Function
public void GetTop20Leaderboard()
{
isRunning = true;
PlayFabClientAPI.GetLeaderboard(
new GetLeaderboardRequest()
{
MaxResultsCount = 20,
StatisticName = "score",
StartPosition = 0
},
result => {
SaveLeaderboardData(result.Leaderboard);
isRunning = false;
},
error => {
DebugLog("Error with GetTop20Leaderboard " + error.GenerateErrorReport());
isRunning = false;
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment