cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Rift + Unity Leaderboards

SaintGabriell
Explorer
Greetings Everyone!

My name is  Mike and i have an issue. I'm working on my first Oculus Rift game (made with Unity, coded in c#) and am having some problems setting up a High-score board for my game. I've already created the board on the Oculus side i'm just not sure how to go about grabbing them in game. i don't think i'll have any issues displaying them once i know how to grab them. i was thinking the scoreboard would display  the top ten scores globally,  and to compare your scores to your friends. however i'm not a great coder and got lost pretty quickly on the oculus Leaderboard page. i'm not looking for a hand out with completed code or anything. i want to learn how to do this properly so I'm not back here on the next game lost and confused all over again. haha.

for example the Leaderboards page says this:

At a high level, there are two processes to implement when integrating leaderboards.
  1. Retrieve and Display Leaderboards - Display the current leaderboard state before a game begins. For example, ovr_Leaderboard_GetEntries for a native app, or Platform.Leaderboards.GetEntries for Unity. There are other methods you can use to get a subset of leaderboard entries based on input criteria.
  2. Update Leaderboard Entries - Write the results of the current game to your leaderboard. For example, ovr_Leaderboard_WriteEntry for a native app, or Platform.Leaderboards.WriteEntry for a Unity app. A user may only have one entry on each leaderboard, subsequent entries will overwrite the existing entry on the specified leaderboard.
this makes sense. i'm using Oculus.Platform; and using Oculus.Platform.Models; at the top of my script so  i type 


Leaderboards.GetEntries(LeaderboardName, *Int limit*,*Start At*);

is int limit how many leader board spots to get and Start At the location in the leaderboard array?


also how do i take that line of code and store it?  so i can populate a highscore board list? 


any tips, pointers or help you guys and gals can offer would be GREATLY appreciated. 


Thanks for your time.

2 REPLIES 2

SaintGabriell
Explorer
Hey @imperativity that would be excellent! thank you so much!

SaintGabriell
Explorer
@imperativity i was wondering if you'd had any update on this ? its one of the few things left for me to do before i submit my app and would really like this feature at launch.

i found a Blog post Oculus did  HERE and i thought it was going to be super helpful but it seems half finished. it tells me how to write the variables at the start of the script, (which id already figured out) in great detail but then doesnt give me any clue as to what to do with them.