logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardEntryTextComposer

    Pure, engine-agnostic composer that renders a RankedEntry into a single display string from a LeaderboardFieldSelection — the text-building half of a HUD leaderboard binding whose locator-registered service exposes the result synchronously (see UnityLeaderboardTopEntryService.TryGetDisplayText).

    Inheritance
    object
    LeaderboardEntryTextComposer
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Leaderboard.Application.Services
    Assembly: Serenity.Leaderboard.Application.dll
    Syntax
    public static class LeaderboardEntryTextComposer

    Methods

    TryCompose(RankedEntry, LeaderboardFieldSelection, string, out string)

    Attempts to compose entry into text by rendering each field in fields, in its authored order, joined by separator.

    Declaration
    public static bool TryCompose(RankedEntry entry, LeaderboardFieldSelection fields, string separator, out string text)
    Parameters
    Type Name Description
    RankedEntry entry

    The ranked entry to render.

    LeaderboardFieldSelection fields

    The parsed field selection. An invalid selection fails the call.

    string separator

    The text inserted between rendered fields. Null or empty falls back to a single space.

    string text

    The composed text, or empty when composition fails.

    Returns
    Type Description
    bool

    true when fields is valid; otherwise false. Pure function: an invalid selection fails the call instead of throwing or logging.

    In this article
    © 2026 Serenity. All Rights Reserved