Unity SDK

Leaderboard Setup Wizard

A guided Unity editor window that walks you through configuring a leaderboard, generates a typed bootstrap script with only the methods you opted into, and previews live data in Play Mode.

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

  1. Overview - what the wizard will generate and a link to the Leaderboards docs.
  2. Settings check - verifies the SDK is installed and an API key is set.
  3. Configure - leaderboard key, player ID source, defaults and which code examples to generate.
  4. Bootstrap - writes Assets/KalmForge/Generated/LeaderboardBootstrap.cs.
  5. Live Preview - lists every board live from the backend (Play Mode required).
  6. Finish - summary plus deep links to the runtime API reference.

Configure step

The fields you fill in drive everything the wizard generates:

Configure step fields
NameTypeDescription
Leaderboard keystringStable dashboard key (e.g. weekly_high_score). Baked into the generated bootstrap.
Player ID sourceradioKalmForgeIdentity.PlayerId (recommended), SystemInfo.deviceUniqueIdentifier, or Custom.
Default score limitintUsed as the default limit for GetScores calls.
Generate examplestogglesSubmit, 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:

LeaderboardBootstrap.csC#
1// Auto-generated by KalmForge Leaderboard Setup Wizard. Re-run the wizard
2// to regenerate. Safe to edit, but changes will be overwritten.
3using System.Collections.Generic;
4using System.Threading.Tasks;
5using KalmForge;
6
7public static class LeaderboardBootstrap
8{
9 public const string Key = "weekly_high_score";
10
11 public static Task<SubmitResult> Submit(double score, string playerName = null)
12 => Leaderboards.Submit(Key, score, playerName: playerName);
13
14 public static Task<List<LeaderboardEntry>> GetScores(int limit = 25)
15 => Leaderboards.GetScores(Key, limit: limit);
16
17 public static Task<List<LeaderboardEntry>> GetScoresAroundPlayer(int before = 5, int after = 5)
18 => Leaderboards.GetScoresAroundPlayer(Key, before, after);
19}
Note
Methods you didn't tick in the Configure step are omitted entirely - no dead code in your project.

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

Back to DocsKalmForge SDK · v1.0.1