cancel
Showing results for 
Search instead for 
Did you mean: 

Lightweight query for number of leaderboard entries?

AllenPestaluky
Explorer
Hi there!

I will soon be integrating the leaderboard service into our Unity game. Leaderboards make the most sense for us when the entries are displayed to the user as, for example, "Top 73%". This percentage-based display requires us to know how many entries exist in the leaderboard.

I see that there is a REST request to get all leaderboard entries, but this seams a bit heavy considering I just want a count of how many exist. I am also using Unity, so I'm not sure if this request is abstracted yet in the Unity SDK. (Unless I can get this functionality by providing a very large "limit" parameter to my get entries request?)

If this isn't possible, I think this "get entry count" might be a good feature to have for games like ours that benefit more from a percentile leaderboard rather than a straight ranking system.

Regards,
Allen
2 REPLIES 2

juanoldinho
Heroic Explorer
Hi,

Have you checked the Platform SDK documentation?

Returns an array of leaderboard entries
https://developer3.oculus.com/documentation/platform/latest/sdk-reference/request-leaderboard-get-en...

LeaderboardEntryArray
https://developer3.oculus.com/documentation/platform/latest/sdk-reference/model-leaderboard-entry-ar...

Let me know if this helps.
Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

Having an issue with our platform, services, or integrations?

Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.

AllenPestaluky
Explorer
Thanks juanoldinho. I suspect that ovrLeaderboardEntryArray.ovr_LeaderboardEntryArray_GetTotalCount is what I'm interested in.

I've taken a quick peek and it looks like there is a "page" paradigm used for retrieving leaderboard entries? With this, I might be able to simply retrieve one "page" of leaderboard scores (relatively lightweight) and from that response, I can grab the total count. Does this sound correct?

Thanks for your help!
Allen