LootLocker
The BasicsGame SystemsContent ManagementPlayer Management
LootLocker
  • 📌The Basics
    • Getting Started
    • What is LootLocker?
    • Core Concepts
      • Players
      • Assets
      • Character Classes
      • API Types
      • Web Console
      • Stage & Live Environments
      • Glossary
    • Unity Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • Unreal Quick Start
      • Install & Configure the SDK
        • Older versions
      • Authenticate Your First Player
    • Godot Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • SDKs
    • Samples
      • Authentication Samples
      • Leaderboard Samples
      • Progression Samples
      • Player Samples
    • Launching Your Game
    • Support
      • Error Codes
      • Unreal Marketplace Plugin Support
  • 🎭Players
    • Overview
    • Authentication
      • How To
        • Guest Login
        • Steam
        • Apple
        • Apple Game Center
        • Google
        • Epic Games
        • PlayStation
        • Meta / Oculus
        • Xbox
        • Nintendo Switch
    • Files
      • How To
        • Manage Files in Web Console
        • Work with Files In-Game
    • Inventory
      • How To
        • Work with Player Inventory
    • Messages
      • How To
        • Configure Messages in Web Console
    • Names
      • How To
        • Work with Player Names
    • Player Manager
      • How To
        • Manage Players through Web Console
        • Manage Players In-Game
        • Use Player Operations
    • Unified Player Accounts
      • How To
        • Configure UPA in Web Console
        • Use Remote Login In-Game
        • Connect Identiy Provider to Player
        • External Provider Linking
        • Transition from Guest Login to Other Provider
        • Disconnect Identity Provider from Player
    • White Label Login
      • How To
        • Configure White Label Login
        • Create a New White Label User
        • Request User Verification
        • Handle Returning Users
        • Start a White Label Session
  • đŸĒ™Commerce
    • Overview
    • Catalogs
      • How To
        • Configure Catalogs in LootLocker Console
        • List all Catalogs
        • Use Catalogs In-Game
        • Setup In-Game Store
    • Currencies
      • How To
        • Configure a Currency in Web Console
        • Use Currencies In-Game
    • DLC Management
      • How To
        • Configure DLC in Web Console
        • Use DLC In-Game
    • Entitlements
      • How To
        • Work with Entitlements In-Game
    • Real Money Purchases
      • How To
        • Configure In-App Purchase in Web Console
        • Make Purchases through Google Play Store
        • Make Purchases through Apple Store
        • Make Purchases through Steam Store
    • Virtual Purchases
    • Wallets
      • How To
        • Manage a Wallet in Web Console
        • Use Wallets In-Game
  • âš”ī¸Content
    • Overview
    • Assets
      • How To
        • Create & Configure an Asset
        • Organize & Search for Assets
        • Retrieve Assets In-Game
        • Set up Asset Storage Template
        • Check Grant Notifications
        • Set up a Game Config Asset
        • Create a Loot Box
        • Work with Loot Boxes In-Game
        • Create a Drop Table
        • Work with Drop Tables In-Game
        • Create a Rental Asset
        • Work with Rental Assets In-Game
    • User Generated Content (UGC)
      • How To
        • Create UGC In-Game
    • Twitch Drops
  • đŸ•šī¸Game Systems
    • Overview
    • Classes & Heroes
      • How To
        • Base Classes
        • Hero Classes
        • Implement Classes In-Game
        • Implement Heroes In-Game
    • Leaderboards
      • How To
        • Configure Leaderboard in Web Console
        • Use Player Leaderboards
        • Use Generic Leaderboards
        • Use Metadata to Store Additional Information
        • Use Scheduled Reset with Rewards
        • Use Leaderboards for Time Based Rankings
      • Leaderboard FAQ
      • GameMaker References
    • Feedback
      • How To
        • Manage Feedback Categories
        • Create Player Feedback
        • Create UGC Feedback
        • Create Game Feedback
        • View and Manage Feedback
    • Progressions
      • How To
        • Create a Progression
        • Game Progressions
        • Player Progressions
        • Class Progressions
        • Asset Instance Progressions
    • Triggers
      • How To
        • Setup a trigger in the Web Console
        • Invoke trigger from game
  • â›“ī¸Shared Systems
    • Overview
    • Metadata
      • How To
        • Add Metadata in Console
        • Fetch a Single Metadata In-Game
        • Fetch Metadata In-Game by Tags
        • Fetch Metadata In-Game from Multiple Sources
    • Notifications
      • How To
        • List Notifications and Mark as Read In-Game
  • đŸ—ī¸Admin
    • Settings
    • User Settings
    • Organization Settings
    • CORS Allowlist
  • â­•ī¸ Legacy
    • Deprecations
      • Unity SDK Deprecation Log
        • Version 2.1.5 - Migration to Open UPM
        • Version 2.0.0
      • Unreal SDK Deprecation Log
        • Version 4.0.0
        • Version 3.0.0
    • Legacy Storage
    • Legacy Triggers
      • Activate a trigger
      • Create a trigger
    • Legacy Progressions
      • Create a Progression System
      • Use a Progression System In-Game
Powered by GitBook
On this page
  • Submitting Score
  • Get Leaderboard Entries
  • Get single Entry on Leaderboard
  1. Game Systems
  2. Leaderboards
  3. How To

Use Player Leaderboards

PreviousConfigure Leaderboard in Web ConsoleNextUse Generic Leaderboards

Last updated 2 months ago

Submitting Score

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

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

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.


var leaderboardKey : String = "my_leaderboard";
var score : int = 1000;
var response = await LL_Leaderboards.SubmitScore.new(leaderboardKey, score).send()
if(!response.success) :
    # Request failed, handle errors
    pass
else:
    # Request succeeded, use response as applicable in your game logic
    pass
curl -X POST "https://api.lootlocker.io/game/leaderboards/1/submit" \
-d "{\"score\": 1000}" \
-H "Content-Type: application/json"

Get Leaderboard Entries

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

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

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.


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
curl -X GET "https://api.lootlocker.io/game/leaderboards/1/list?count=50"

Get single Entry on 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!");
});

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.


var leaderboardKey : String = "my_leaderboard";
var memberId : String = "a_member_id";

var response = await LL_Leaderboards.GetMemberRank.new(leaderboardKey, memberId).send()
if(!response.success) :
    # Request failed, handle errors
    pass
else:
    # Request succeeded, use response as applicable in your game logic
    pass
curl -X GET "https://api.lootlocker.io/game/leaderboards/1/member/1"

Check out our for a more in-depth understanding of the endpoint!

Check out our for a more in-depth understanding of the endpoint!

Check out our for a more in-depth understanding of the endpoint!

Check out our for a more in-depth understanding of the endpoint!

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

đŸ•šī¸
ref documentation
ref documentation
ref documentation
ref documentation
look here
ref documentation
look here
ref documentation
look here
Blueprint example of submitting scores
Blueprint example of getting top scores
Blueprint example of getting score for a member