LightLeaderboard gives your Unity game a live global leaderboard backed by a managed API.
Use plain UnityWebRequest — no packages, no SDK to maintain.
Two C# files, four steps, and you're live.
Sign up for free, click New Game, and copy your API key and game ID. That's the only configuration you'll need.
Unity's JsonUtility needs [Serializable] classes. Drop this file anywhere in your project.
// ScorePayload.cs — required by JsonUtility
using System;
[Serializable]
public class ScorePayload
{
public int score;
public string playerRefId;
public string playerName;
public string submissionId;
}
[Serializable]
public class ScoreResponse { public int id; public int rank; public int score; }
[Serializable]
public class LeaderboardEntry { public int rank; public string playerName; public int score; }
[Serializable]
public class LeaderboardResponse { public LeaderboardEntry[] entries; }Attach LeaderboardManager to a persistent GameObject (your GameManager or a dedicated object).
Call SubmitScore() when a run ends.
// LeaderboardManager.cs — attach to a persistent GameObject
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
public class LeaderboardManager : MonoBehaviour
{
const string ApiUrl = "https://leaderboard.goproso.com/api/v1/games/my_game";
const string ApiKey = "YOUR_API_KEY";
public void SubmitScore(int score, string playerId, string playerName)
=> StartCoroutine(SubmitScoreCoroutine(score, playerId, playerName));
IEnumerator SubmitScoreCoroutine(int score, string playerId, string playerName)
{
var payload = JsonUtility.ToJson(new ScorePayload {
score = score,
playerRefId = playerId,
playerName = playerName,
submissionId = System.Guid.NewGuid().ToString(),
});
byte[] body = System.Text.Encoding.UTF8.GetBytes(payload);
using var req = new UnityWebRequest(ApiUrl + "/scores", "POST");
req.uploadHandler = new UploadHandlerRaw(body);
req.downloadHandler = new DownloadHandlerBuffer();
req.SetRequestHeader("Authorization", "Bearer " + ApiKey);
req.SetRequestHeader("Content-Type", "application/json");
yield return req.SendWebRequest();
if (req.result == UnityWebRequest.Result.Success)
{
var res = JsonUtility.FromJson<ScoreResponse>(req.downloadHandler.text);
Debug.Log($"Submitted! Rank: #{res.rank}"); // update UI here
}
}
}Call GET /leaderboard?limit=10 with the same Authorization header and
populate your TextMeshPro or UGUI Text components in the callback.
See the full Unity guide for a complete fetch example.
The submit endpoint returns the player's current rank in the same response — no polling.
Daily, weekly, monthly, and all-time periods. Rotate weekly events without any backend work.
Fetch the rows around a specific player so they always see where they rank, not just the top 10.
Pass a submissionId to prevent duplicate entries from network retries.
iOS, Android, PC, Mac — UnityWebRequest handles all platforms. WebGL needs CORS bypass via your own backend.
Attach arbitrary metadata per score (level, character, region) and filter or display it in the dashboard.
Free account. No credit card. Live rankings in one afternoon.