Class LeaderboardThemeRetrofitter
Adds a generated Leaderboard.prefab to an already-shipped theme that predates the leaderboard
chrome slot, wiring it into UnityUiThemeComponents.LeaderboardTemplate. Reuses
Serenity.Ui.Installation.Editor.Settings.Builder.ChromePrefabBuilders.BuildLeaderboard(Serenity.Ui.Installation.Editor.Settings.Builder.GenerationContext) against a minimal Serenity.Ui.Installation.Editor.Settings.Builder.GenerationContext
reconstructed from the theme's own already-generated Background/Title/Label prefabs -- it does not
regenerate the whole theme, only the one missing prefab.
Inherited Members
Namespace: Serenity.Ui.Installation.Editor.Settings.Builder
Assembly: Serenity.UnityUi.Installation.Editor.dll
Syntax
public static class LeaderboardThemeRetrofitter
Methods
RetrofitAllThemesMissingLeaderboard(bool, bool)
Retrofits every UnityUiThemeDefinition in the project whose UnityUiThemeComponents.LeaderboardTemplate is still unset. Safe to re-run: themes that already carry the slot are skipped, not regenerated.
Declaration
public static LeaderboardThemeRetrofitter.RetrofitReport RetrofitAllThemesMissingLeaderboard(bool registerAsAddressables = true, bool regenerateExisting = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | registerAsAddressables | When true, registers every newly created Leaderboard.prefab in the Serenity Addressables group (module:ui), matching how Serenity.Ui.Installation.Editor.Settings.Builder.ThemeCreator tags generated theme assets. |
| bool | regenerateExisting | When true, themes that already carry a |
Returns
| Type | Description |
|---|---|
| LeaderboardThemeRetrofitter.RetrofitReport |
RetrofitTheme(UnityUiThemeDefinition, bool, bool)
Generates and wires the Leaderboard.prefab for a single theme. Idempotent by default: returns the
existing prefab unchanged when the slot is already assigned, so callers (including tests) can call
this twice in a row safely. Pass regenerateExisting true to force a rebuild even
when a template already exists (overwrites the same path, so the prefab's GUID and any Addressables
entry survive).
Declaration
public static GameObject RetrofitTheme(UnityUiThemeDefinition theme, bool registerAsAddressables, bool regenerateExisting = false)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityUiThemeDefinition | theme | |
| bool | registerAsAddressables | |
| bool | regenerateExisting |
Returns
| Type | Description |
|---|---|
| GameObject |