logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudFlexboxRepresentation

    A container that lays other HUD elements out along its own grow direction, flexbox-style. Reads no value of its own; the elements placed inside it (via their authored ParentId) are its content.

    Inheritance
    object
    UnityHudRepresentation
    UnityHudFlexboxRepresentation
    Implements
    IHudRepresentation
    Inherited Members
    UnityHudRepresentation.FollowsTheme
    UnityHudRepresentation.HasThemedChrome
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.GameUi.Infrastructure.Representations
    Assembly: Serenity.UnityGameUi.Infrastructure.dll
    Syntax
    public sealed class UnityHudFlexboxRepresentation : UnityHudRepresentation, IHudRepresentation
    Remarks

    Direction and gap are deliberately not repeated here: the element already carries a GrowDirection and a PartSpacing/theme spacing, and UnityHudElementView.ApplyGrowLayout already turns them into a UnityEngine.UI.HorizontalOrVerticalLayoutGroup on the element's own container for every representation. A box only reconfigures the group that is already there.

    Constructors

    UnityHudFlexboxRepresentation()

    Declaration
    public UnityHudFlexboxRepresentation()

    Properties

    Align

    Positioning of the box's children along its cross axis.

    Declaration
    public LayoutAlignment Align { get; }
    Property Value
    Type Description
    LayoutAlignment

    Justify

    Distribution of the box's children along its main axis.

    Declaration
    public LayoutAlignment Justify { get; }
    Property Value
    Type Description
    LayoutAlignment

    Kind

    Declaration
    public override HudRepresentationKind Kind { get; }
    Property Value
    Type Description
    HudRepresentationKind
    Overrides
    UnityHudRepresentation.Kind

    Padding

    Inner spacing between the box's edges and the elements placed inside it.

    Declaration
    public LayoutPadding Padding { get; }
    Property Value
    Type Description
    LayoutPadding

    ScaleAwareLayout

    Whether the layout accounts for a scaled child's actual on-screen size.

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

    Methods

    CreateRenderer()

    Creates the object that builds and drives this representation's visuals.

    Declaration
    public override IHudRepresentationRenderer CreateRenderer()
    Returns
    Type Description
    IHudRepresentationRenderer

    A renderer bound to this configuration.

    Overrides
    UnityHudRepresentation.CreateRenderer()

    Implements

    IHudRepresentation
    In this article
    © 2026 Serenity. All Rights Reserved