logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardButtonFactory

    Builds one LeaderboardButtonHandle for an authored LeaderboardViewButton, in priority order: the active theme's Submittable (via CreateOptionComponent(string, int, string, bool), same real themed component the cascade menu renders its options with), the theme's raw submittable template instantiated directly when no ready SerenityUiContext is available, or a bare procedural image + label when neither exists. Mirrors the theme/template/procedural fallback chain CreateProcedural(Transform, GameObject) and CascadeMenuRenderer already use.

    Inheritance
    object
    LeaderboardButtonFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Leaderboard.Infrastructure.Views
    Assembly: Serenity.UnityLeaderboard.Infrastructure.dll
    Syntax
    public static class LeaderboardButtonFactory

    Methods

    Build(Transform, LeaderboardViewButton, int, SerenityUiContext, GameObject, ILogService)

    Builds and parents one button under parent, wiring its mouse click to Submitted.

    Declaration
    public static LeaderboardButtonHandle Build(Transform parent, LeaderboardViewButton button, int index, SerenityUiContext uiContext, GameObject submittableTemplate, ILogService logService)
    Parameters
    Type Name Description
    Transform parent

    The transform the button is parented under (the panel's own root).

    LeaderboardViewButton button

    The authored button to render.

    int index

    The button's position among its view's buttons; used to give the themed option component a stable id.

    SerenityUiContext uiContext

    The active theme's context, or null/not-ready to fall back to the template or procedural path.

    GameObject submittableTemplate

    The theme's raw Submittable prefab, used when uiContext is unavailable.

    ILogService logService

    Logging service, forwarded to the themed path's own error reporting.

    Returns
    Type Description
    LeaderboardButtonHandle

    The built handle.

    In this article
    © 2026 Serenity. All Rights Reserved