logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardThemeRetrofitter

    Adds a generated Leaderboard.prefab to an already-shipped theme that predates the leaderboard chrome slot, wiring it into LeaderboardTemplate.

    Inheritance
    object
    LeaderboardThemeRetrofitter
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Installation.Editor.Settings.Builder
    Assembly: Serenity.UnityUi.Installation.Editor.dll
    Syntax
    public static class LeaderboardThemeRetrofitter
    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 leaderboard — the slot's accessors and its builder.

    Methods

    FindThemesMissingLeaderboard()

    Ids of every theme whose LeaderboardTemplate slot is still empty — the affected-scope preview shown before running RetrofitAllThemesMissingLeaderboard(bool, bool).

    Declaration
    public static List<string> FindThemesMissingLeaderboard()
    Returns
    Type Description
    List<string>

    RetrofitAllThemesMissingLeaderboard(bool, bool)

    Retrofits every UnityUiThemeDefinition in the project whose 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 LeaderboardTemplate are rebuilt too (overwriting the existing Leaderboard.prefab in place, same path/GUID) instead of being skipped -- use this to bring themes generated before a Leaderboard layout change up to date.

    Returns
    Type Description
    LeaderboardThemeRetrofitter.RetrofitReport

    What the run changed.

    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. 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 leaderboard panel prefab.

    In this article
    © 2026 Serenity. All Rights Reserved