Class AchievementsThemeRetrofitter
Adds a generated Achievements.prefab to an already-shipped theme that predates the achievements
chrome slot, wiring it into AchievementsTemplate.
Inherited Members
Namespace: Serenity.Ui.Installation.Editor.Settings.Builder
Assembly: Serenity.UnityUi.Installation.Editor.dll
Syntax
public static class AchievementsThemeRetrofitter
Remarks
A facade over Serenity.Ui.Installation.Editor.Settings.Builder.ThemeComponentRetrofitter, which owns every decision a retrofit makes; this type contributes only what is specific to the achievements panel — the slot's accessors and its builder. Mirrors LeaderboardThemeRetrofitter exactly, which is the point: the two screens are retrofitted by the same engine, so they cannot disagree about what "already up to date" means.
Methods
FindThemesMissingAchievements()
Ids of every theme whose AchievementsTemplate slot is still empty — the affected-scope
preview shown before running RetrofitAllThemesMissingAchievements(bool, bool). Read-only, called
every OnGUI by AchievementsThemeRetrofitterWindow, so it must never throw the way the write
path does: when the Achievements module is not compiled into this project there is nothing to
preview, so it reports no themes missing rather than failing the draw.
Declaration
public static List<string> FindThemesMissingAchievements()
Returns
| Type | Description |
|---|---|
| List<string> |
RetrofitAllThemesMissingAchievements(bool, bool)
Retrofits every UnityUiThemeDefinition in the project whose
AchievementsTemplate is still unset. Safe to re-run: themes that already carry the slot are
skipped, not regenerated.
Declaration
public static AchievementsThemeRetrofitter.RetrofitReport RetrofitAllThemesMissingAchievements(bool registerAsAddressables = true, bool regenerateExisting = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | registerAsAddressables | When true, registers every newly created Achievements.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 an |
Returns
| Type | Description |
|---|---|
| AchievementsThemeRetrofitter.RetrofitReport | What the run changed. |
RetrofitTheme(UnityUiThemeDefinition, bool, bool)
Generates and wires the Achievements.prefab for a single theme. Idempotent by default: returns the
existing prefab unchanged when the slot is already assigned. 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 | The theme to retrofit. |
| bool | registerAsAddressables | When true, registers the created prefab in the Serenity Addressables group. |
| bool | regenerateExisting | When true, rebuilds even a theme that already carries the slot. |
Returns
| Type | Description |
|---|---|
| GameObject | The theme's achievements panel prefab. |