Created
September 14, 2019 19:26
-
-
Save Raziel619/9a0fda335b4da991343e5e31dd9da28f to your computer and use it in GitHub Desktop.
Playfab GetTop20Leaderboard Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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