For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use Generic Leaderboards

Get list of Scores

List the top 50 scores from a leaderboard.

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 the Reference Documentation for a more in-depth understanding of the endpoint.


var leaderboardKey : String = "my_leaderboard";
var count : int = 50;

var response = await LL_Leaderboards.GetScoreList.new(leaderboardKey, count).send()
if(!response.success) :
    # Request failed, handle errors
    pass
else:
    # Request succeeded, use response as applicable in your game logic
    pass

Use Generic Leaderboard as a Clan List with Members

Use a Leaderboard to store a list of members in a clan or guild.

string clanName = "super cool clan!";
string metadata = "{clan_members:5213125,534034,534238,213890}";
string leaderboardKey = "leaderboard_clan_list";
int clanScore = 519;

LootLockerSDKManager.SubmitScore(clanName, clanScore, leaderboardKey, metadata, (response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not submit score!");
        Debug.Log(response.errorData.ToString());
        return;
    }
    Debug.Log("Successfully submitted score!\n with metadata: " + metadata);
});

To copy and paste the above example into your editor, look here.

Input

You need to exchange the SubmitClanScore event for whatever event you want to use to trigger this flow.

Replace the input variables with the data you want to submit to the leaderboard.

Output

We recommend branching the completed events on the success flag in the response, and if you do this, you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.

Last updated

Was this helpful?