question

mecheka avatar image
mecheka asked

Leaderboards and extra data

Hi, I would like to get the leader-boards for a statistic AND some Player Data (Title) from each of the players on that leader-board.

I want to create a Leader-board in a Unity game, and each of the players has a Skin equipped, and I want that skin to be shown. Currently the data pulled from the Leader-boards doesn't give me access to the Player Data (Title) which is where I think the "equipped_skin" parameter should be. This forces me to do an API call for each player on the Leader-board, which is insane.

Maybe I'm not formatting my game right, or I'm missing something.

Thanks in advance!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

We'll be providing the other player statistics as part of the player profile shortly (have a look at the ProfileConstraints in the leaderboard queries), but player data isn't something we'll be able to provide in a leaderboard query, as data can be quite large, which would drive up the cost of that query considerably. But you do have a few options. If the player "skin" is something that can be an icon in your game's web portal, you could simply add it as the AvatarUrl for the player, which can be returned with the leaderboard. Alternately, if it's a selection from a set of possible avatars, or even one constructed from a set of primitives, you could use a statistic to provide that information when we enable player profile statistics.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.