logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardElementPlacement

    Where and how one element of a leaderboard view sits when Custom Layout is on.

    Inheritance
    object
    LeaderboardElementPlacement
    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 class LeaderboardElementPlacement

    Constructors

    LeaderboardElementPlacement()

    Unity constructor. Use LeaderboardElementPlacement(LeaderboardViewElement) from code.

    Declaration
    public LeaderboardElementPlacement()

    LeaderboardElementPlacement(LeaderboardElementPlacement)

    Copies every authored field of source into a new, independent instance.

    Declaration
    public LeaderboardElementPlacement(LeaderboardElementPlacement source)
    Parameters
    Type Name Description
    LeaderboardElementPlacement source

    LeaderboardElementPlacement(LeaderboardViewElement)

    Declaration
    public LeaderboardElementPlacement(LeaderboardViewElement forElement)
    Parameters
    Type Name Description
    LeaderboardViewElement forElement

    Properties

    Anchor

    Which panel corner or edge the element is anchored to.

    Declaration
    public UiAnchorType Anchor { get; }
    Property Value
    Type Description
    UiAnchorType

    Element

    Which element of the view this placement positions.

    Declaration
    public LeaderboardViewElement Element { get; }
    Property Value
    Type Description
    LeaderboardViewElement

    Hidden

    Whether the element is hidden entirely.

    Declaration
    public bool Hidden { get; }
    Property Value
    Type Description
    bool

    Offset

    Nudge from the anchor, in reference-resolution pixels.

    Declaration
    public Vector2 Offset { get; }
    Property Value
    Type Description
    Vector2

    RotationDegrees

    Rotation, in degrees counter-clockwise, around the anchor.

    Declaration
    public float RotationDegrees { get; }
    Property Value
    Type Description
    float

    Scale

    Uniform scale for the element. A zero-or-negative value (unreachable through the inspector's [Range(0.1f, 5f)], but not through a recipe import or another authoring path) normalizes to 1.

    Declaration
    public float Scale { get; }
    Property Value
    Type Description
    float

    Size

    Size of the element, in reference-resolution pixels; each axis clamped to zero or above.

    Declaration
    public Vector2 Size { get; }
    Property Value
    Type Description
    Vector2

    Stretch

    Per-axis stretch applied to the element's own local X and Y axes, before rotation. A placement serialized before this field existed deserializes it as (0, 0), and a zero-or-negative component is normalized to 1 rather than stored — so an existing placement keeps its uniform proportions with no manual step.

    Declaration
    public Vector2 Stretch { get; }
    Property Value
    Type Description
    Vector2

    Methods

    Clone()

    An independent copy of this placement, safe for the caller to mutate.

    Declaration
    public LeaderboardElementPlacement Clone()
    Returns
    Type Description
    LeaderboardElementPlacement

    SetHidden(bool)

    Sets whether the element is hidden. Used by the Leaderboard View Designer.

    Declaration
    public void SetHidden(bool value)
    Parameters
    Type Name Description
    bool value

    SetPlacement(UiAnchorType, Vector2)

    Sets the placement. Used by the Leaderboard View Designer.

    Declaration
    public void SetPlacement(UiAnchorType placementAnchor, Vector2 placementOffset)
    Parameters
    Type Name Description
    UiAnchorType placementAnchor
    Vector2 placementOffset

    SetSize(Vector2)

    Sets the size. Used by the Leaderboard View Designer.

    Declaration
    public void SetSize(Vector2 placementSize)
    Parameters
    Type Name Description
    Vector2 placementSize

    SetTransform(float, Vector2, float)

    Sets the scale, stretch and rotation. Used by the Leaderboard View Designer.

    Declaration
    public void SetTransform(float placementScale, Vector2 placementStretch, float rotationDegrees)
    Parameters
    Type Name Description
    float placementScale
    Vector2 placementStretch
    float rotationDegrees
    In this article
    © 2026 Serenity. All Rights Reserved