Prerequisites
- KalmForge SDK installed in your Unity project.
- API key configured in Window → KalmForge.
- At least one leaderboard created in the dashboard.
- Play Mode is required for the Live Preview step.
What it is
Open from KalmForge → Leaderboard Setup Wizard. The window walks through the entire leaderboard integration end-to-end and ships you out with a generated, fully documented bootstrap script containing only the methods you opted into.
Wizard steps
- Overview - what the wizard will generate and a link to the Leaderboards docs.
- Settings check - verifies the SDK is installed and an API key is set.
- Configure - leaderboard key, player ID source, defaults and which code examples to generate.
- Bootstrap - writes
Assets/KalmForge/Generated/LeaderboardBootstrap.cs. - Live Preview - lists every board live from the backend (Play Mode required).
- Finish - summary plus deep links to the runtime API reference.
Configure step
The fields you fill in drive everything the wizard generates:
| Name | Type | Description |
|---|---|---|
| Leaderboard key | string | Stable dashboard key (e.g. weekly_high_score). Baked into the generated bootstrap. |
| Player ID source | radio | KalmForgeIdentity.PlayerId (recommended), SystemInfo.deviceUniqueIdentifier, or Custom. |
| Default score limit | int | Used as the default limit for GetScores calls. |
| Generate examples | toggles | Submit, GetScores, GetScoresAroundPlayer, rotation/seasonal helpers. |
Bootstrap script
The Bootstrap step writes a typed, fully documented helper at Assets/KalmForge/Generated/LeaderboardBootstrap.cs that contains only the methods you opted into. The leaderboard key is baked in so call sites stay short:
1// Auto-generated by KalmForge Leaderboard Setup Wizard. Re-run the wizard2// to regenerate. Safe to edit, but changes will be overwritten.3using System.Collections.Generic;4using System.Threading.Tasks;5using KalmForge;67public static class LeaderboardBootstrap8{9 public const string Key = "weekly_high_score";1011 public static Task<SubmitResult> Submit(double score, string playerName = null)12 => Leaderboards.Submit(Key, score, playerName: playerName);1314 public static Task<List<LeaderboardEntry>> GetScores(int limit = 25)15 => Leaderboards.GetScores(Key, limit: limit);1617 public static Task<List<LeaderboardEntry>> GetScoresAroundPlayer(int before = 5, int after = 5)18 => Leaderboards.GetScoresAroundPlayer(Key, before, after);19}Live preview
In Play Mode the Live Preview step calls Leaderboards.List() and renders each board as a card showing its key, sort direction, max entries and active state. Use it as a sanity check before shipping a build.
Status menu
KalmForge → Check Leaderboard Setup opens a status dialog summarising whether the SDK is installed, whether an API key is configured, and whether a bootstrap script has been generated. Useful when onboarding a teammate.
Next steps
- Read the Leaderboards runtime API reference.
- Drop a working UI into your scene with the Add Leaderboard to Scene scaffolder.