loaderLeaderboard

API References for Leaderboard Service

Explore the list of API functions available in Unity for managing leaderboards and player scores, including detailed descriptions and usage examples.

circle-exclamation

Get Available Leaderboardsarrow-up-right

Retrieves a list of leaderboards based on the provided parameters.

var leaderboards = await ServiceHub.Services.Leaderboard.GetLeaderboards(new GetLeaderboardsParams
{
    label = null,
    skip = 0,
    limit = 0
});

Get Users Scoresarrow-up-right

Obtains scores for individual users as specified by the input parameters.

var scores = await ServiceHub.Services.Leaderboard.GetUsersScores<GetScoresParams, UserScore>(new GetScoresParams
{
    Leaderboardid = 0,
    skip = 0,
    limit = 0,
    returnUserScore = false,
    Conditions = new Eq("field", "value").ToQuery()
});

Get Parties Scoresarrow-up-right

Fetches scores for different parties (e.g., teams or groups) according to the given parameters.

Get Friends Scoresarrow-up-right

Gathers scores specifically for friends of the current user.

Get My Scorearrow-up-right

Retrieves the score of the current user based on the input parameters.

Submit New Scorearrow-up-right

Submits a user's score and returns the result.

Last updated