logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityUiThemeHudStyle

    What the theme contributes to a HUD: its typography and rhythm, plus fallback chrome for anything an element has not authored yet.

    Inheritance
    object
    UnityUiThemeHudStyle
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Infrastructure.Entities
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class UnityUiThemeHudStyle
    Remarks

    The theme is a fallback here, not the authority, and that is a deliberate difference from how it governs menus. A menu is UI chrome and should change completely when the theme changes; a HUD is mostly game art. A game's bullet, its life pips and its bar frames are usually drawn together by the same artist in the same pass, and nobody expects them to change shape because the menu theme was swapped. So the element wins wherever it has said something.

    What the theme does keep is typography and spacing: a HUD in a different typeface from the rest of the interface reads as broken, and that consistency is exactly what a theme is for. Colours are absent on purpose — tinting game art is art direction, and the element already owns it.

    Everything here is consulted only when the corresponding element field is unset: a null sprite or a zero size. That keeps inheritance explicit at the point of authoring rather than hidden behind a flag, and it is the same "override or fall back to the theme" shape the toast prefab already uses.

    Constructors

    UnityUiThemeHudStyle()

    Declaration
    public UnityUiThemeHudStyle()

    Fields

    ElementSpacing

    Declaration
    public float ElementSpacing
    Field Value
    Type Description
    float

    FallbackGaugeFillSprite

    Declaration
    public Sprite FallbackGaugeFillSprite
    Field Value
    Type Description
    Sprite

    FallbackGaugeSize

    Declaration
    public Vector2 FallbackGaugeSize
    Field Value
    Type Description
    Vector2

    FallbackGaugeTrackSprite

    Declaration
    public Sprite FallbackGaugeTrackSprite
    Field Value
    Type Description
    Sprite

    FallbackIconSize

    Declaration
    public Vector2 FallbackIconSize
    Field Value
    Type Description
    Vector2

    FallbackItemSize

    Declaration
    public Vector2 FallbackItemSize
    Field Value
    Type Description
    Vector2

    FallbackSegmentEmptySprite

    Declaration
    public Sprite FallbackSegmentEmptySprite
    Field Value
    Type Description
    Sprite

    FallbackSegmentFilledSprite

    Declaration
    public Sprite FallbackSegmentFilledSprite
    Field Value
    Type Description
    Sprite

    TextColor

    Declaration
    public Color TextColor
    Field Value
    Type Description
    Color
    In this article
    © 2026 Serenity. All Rights Reserved