logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardElementPlacementDefaults

    Shared, never-mutated default placements the leaderboard panel falls back to when an element has no authored placement of its own.

    Inheritance
    object
    LeaderboardElementPlacementDefaults
    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.Settings
    Assembly: Serenity.UnityLeaderboard.Infrastructure.dll
    Syntax
    public static class LeaderboardElementPlacementDefaults

    Methods

    For(LeaderboardViewElement)

    The default placement for element.

    Declaration
    public static LeaderboardElementPlacement For(LeaderboardViewElement element)
    Parameters
    Type Name Description
    LeaderboardViewElement element
    Returns
    Type Description
    LeaderboardElementPlacement
    Remarks

    The returned instance is shared across every caller and must not be mutated — the same rule UnityHudElementDefinition.EmptyThresholdRamp follows for its own shared fallback. ResolvePlacement(LeaderboardViewElement) and ResolveElementPlacements() already clone the result before handing it to their own callers, so a caller that only goes through them never sees this instance.

    NewButtonPlacement()

    A fresh placement for a newly authored LeaderboardViewButton: anchored bottom-center, nudged up from the panel's bottom edge, sized to a comfortable button footprint. Unlike For(LeaderboardViewElement) this returns an independent instance every call — a button is never shared across authors the way the three fixed elements' defaults are, so there is no shared instance to protect from mutation.

    Declaration
    public static LeaderboardElementPlacement NewButtonPlacement()
    Returns
    Type Description
    LeaderboardElementPlacement
    In this article
    © 2026 Serenity. All Rights Reserved