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

Leaderboard

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.

Get Available Leaderboards​

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 Scores​

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 Scores​

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

Get Friends Scores​

Gathers scores specifically for friends of the current user.

Get My Score​

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

Submit New Score​

Submits a user's score and returns the result.

Last updated