Real-time rankings and high scores. Create global, friends-only, or time-based leaderboards with automatic updates.
Scores update instantly across all connected clients.
Daily, weekly, monthly, or all-time leaderboards.
Show scores for friends only.
Players can have scores in multiple leaderboards.
1// Submit a score2var result = await Ondara.Leaderboards.Submit("high_scores", 5000);3
4if (result.IsSuccess)5{6 Debug.Log($"Score submitted! New rank: #{result.Value.Rank}");7 Debug.Log($"Is new best: {result.Value.IsNewBest}");8}9
10// Submit with metadata (e.g., level, character used)11await Ondara.Leaderboards.Submit("high_scores", 5000, new Dictionary<string, object>12{13 { "level", "world_3" },14 { "character", "knight" },15 { "time", 120.5f }16});1public class LeaderboardEntry2{3 public string PlayerId { get; } // Unique player identifier4 public string PlayerName { get; } // Display name5 public int Rank { get; } // Position on leaderboard (1-indexed)6 public long Score { get; } // The score value7 public float Percentile { get; } // Top X% of all players8 public DateTime SubmittedAt { get; } // When score was submitted9 public Dictionary<string, object> Metadata { get; } // Custom data10}Validate Scores Server-side
Enable score validation in dashboard settings to prevent cheating.
Use Metadata for Context
Store level, character, or game mode with scores for richer leaderboards.
Show Nearby Rankings
Players engage more when they see beatable scores just above them.
Multiple Time Frames
Daily/weekly resets give new players a chance to compete.