Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
7 years ago

Leaderboard Entries?

The oculus leaderboard has three properties: API Name, Sort Order and Total Entries. My initial assumption was that the API Name referred to a single leaderboard that could have multiple key-value entries, but the documentation doesn't say how to add entries. The Write Leaderboard Integer node only has a Stat Name, which seems to correlate to the API Name and not some property in the leaderboard. So, how do I add entries to a leaderboard?

3 Replies

Replies have been turned off for this discussion
  • Hi

    I haven't done this in Unreal, but must be the same in unity assuming you have the same Oculus Integration within Unreal that you have in Unity the Oculus.Platform will handle pretty much everything for you.

    The API name is a string reference to the leaderboard, when submitting a score to the leaderboard you include the API Name so Oculus know which leaderboard to add it to and the score you wish to add to that board.

    To submit a score you use
    Oculus.Platform.Leaderboard.WriteEntry(APIName,score)
    Oculus handle the rest

    It's worth noting you can't use Leaderboards until you have Initialized the core otherwise it will just return a null

    Hope that helps, goodluck
    Mike
  • Anonymous's avatar
    Anonymous
    If multiple users are referring to the same API Name, then how are you supposed to have unique entries for each user... Maybe the currently logged in user is captured behind the scenes when the entry is written?
  • As you rightly say the user name is handled by Oculus, they submit the username at the same time, you don't have control over that part.

    I think the confusion is in "API name", it isn't really an API name in the the sense we are used to to us its just Leaderboard name really.

    Thought it was worth adding, I've used the Oculus Leaderboards in 3 launched applications now, once you have it working it's really nice and simple to use.