Use Generic Leaderboards

Use Generic Leaderboard as a Clan List with Members

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);
});

Submit Score

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

Last updated