Use Player Leaderboards
Submitting Score
Submit a score to a player leaderboard.
string leaderboardKey = "my_leaderboard";
int score = 1000;
LootLockerSDKManager.SubmitScore("", score, leaderboardKey, (response) =>
{
if (!response.success) {
Debug.Log("Could not submit score!");
Debug.Log(response.errorData.ToString());
return;
}
Debug.Log("Successfully submitted score!");
});
Check out our Reference Documentation for a more in-depth understanding of the endpoint.
Get Leaderboard Entries
Retrieve the first 50 player leaderboard entires.
string leaderboardKey = "my_leaderboard";
int count = 50;
LootLockerSDKManager.GetScoreList(leaderboardKey, count, 0, (response) =>
{
if (!response.success) {
Debug.Log("Could not get score list!");
Debug.Log(response.errorData.ToString());
return;
}
Debug.Log("Successfully got score list!");
});
Check out our Reference Documentation for a more in-depth understanding of the endpoint.
Get Single Entry on Leaderboard
Retrieve a single entry on a player leaderboard.
string leaderboardKey = "my_leaderboard";
string memberID = "50";
LootLockerSDKManager.GetMemberRank(leaderboardKey, memberID, (response) =>
{
if (!response.success) {
Debug.Log("Could not get the entry!");
Debug.Log(response.errorData.ToString());
return;
}
Debug.Log("Successfully got entry!");
});
Last updated