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

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.

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

Input

You need to exchange the TriggerSubmitScore 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.

Check out our Reference Documentation for a more in-depth understanding of the endpoint.

Check out our Reference Documentation for a more in-depth understanding of the endpoint.

Get Leaderboard Entries

Retrieve the first 50 player leaderboard entires.

Check out our Reference Documentation for a more in-depth understanding of the endpoint.

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

Input

You need to exchange the TriggerGetScores event for whatever event you want to use to trigger this flow. Replace the input variables with your leaderboard key, and how many items you want to get.

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. If you want to fetch more items on the score list, you'll want to save the pagination information for later use.

Check out our Reference Documentation for a more in-depth understanding of the endpoint.

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.

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

Input

You need to exchange the TriggerGetScores event for whatever event you want to use to trigger this flow. Replace the input variables with your leaderboard key and what member you want to fetch.

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?