Before starting, make sure to setup a high score table, see the high scores management page.

Leaderboard Menu

   // "LEADERBOARD" is the Table name
   Idnet.I.Leaderboard("LEADERBOARD");

PostHighscore

var exampleScore = 1001 + Random.Range(0, 1000);

// "LEADERBOARD" is the Table name
Idnet.I.PostHighscore(exampleScore, "LEADERBOARD");

PostHighscore with callback

  • Can be used with Submit Score button logic.
var exampleScore = 1001 + Random.Range(0, 1000);

// "LEADERBOARD" is the Table name
Idnet.I.PostHighscore(exampleScore, "LEADERBOARD", (score, postHighscoreException) =>  {
 if (postHighscoreException == null)
 {
   Debug.Log("Score posted succesfully,open leaderboard window here");
 }
 else
 {
   Debug.Log("Posting score failed " + postHighscoreException); 	
 }
});

TimerLeaderboard Menu

//Let IDnet know that its a timer leaderboard.
Idnet.I.TimerLeaderboard=true;

// "LEADERBOARD" is the Table name
Idnet.I.Leaderboard("LEADERBOARD");

PostTime

//Let IDnet know that its a timer leaderboard.
Idnet.I.TimerLeaderboard=true;

//Time posted should be in "Milliseconds",here "127676698" is a milliseconds time.
var exampleTime = 127676698;

// "LEADERBOARD" is the Table name
Idnet.I.PostHighscore(exampleScore, "LEADERBOARD");