Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi Dan, I would like to know the ranking position of a Username.

I tried the following code, but it doesn't find anything.

Can you help me? Thank you very much.

public void LoadRankingPosition()

{

LeaderboardCreator.GetLeaderboard(_leaderboardPublicKey, LeaderboardSearchQuery.ByUsername(_playerUsernameInput.text), RankingPosition);

}

public void RankingPosition(Entry[] entries)

{

_rankingPosition.text = $"{entries[0].RankSuffix()}";

}

Hello!

Technically the code you've written here should be working if there is an entry in the leaderboard. I recommend checking out the updated demo scene, which demonstrates how to obtain the ranks of the entries. Its included in the downloads.