logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudElementAnimation

    Inspector-authored implementation of IHudElementAnimationDefinition.

    Inheritance
    object
    UnityHudElementAnimation
    Implements
    IHudElementAnimationDefinition
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameUi.Infrastructure.Settings
    Assembly: Serenity.UnityGameUi.Infrastructure.dll
    Syntax
    public class UnityHudElementAnimation : IHudElementAnimationDefinition
    Remarks

    The animation entry lives on the element it actually animates — not on some other element it names as a target. When Layer is an ActivationSequenceLayerSO-style layer asset, the layer's own baked transformId should equal the OWNING element's id (the element whose animations list this entry sits in), not a separately-named target.

    Constructors

    UnityHudElementAnimation()

    Declaration
    public UnityHudElementAnimation()

    Properties

    CooldownSeconds

    Minimum time between two plays of this animation, in seconds.

    Declaration
    public float CooldownSeconds { get; }
    Property Value
    Type Description
    float
    Remarks

    A negative value (unreachable through the inspector's [Min(0f)], but not through a recipe import or another authoring path) normalizes to zero, mirroring ChangeFeedbackCooldownSeconds.

    HasAnimationAsset

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

    Layer

    The ProceduralAnimator layer this animation plays, for the view and the HUD host.

    Declaration
    public ProceduralLayerSO Layer { get; }
    Property Value
    Type Description
    ProceduralLayerSO

    PlaysWhileHidden

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

    SignalTypeName

    Declaration
    public string SignalTypeName { get; }
    Property Value
    Type Description
    string

    Trigger

    Declaration
    public HudAnimationTrigger Trigger { get; }
    Property Value
    Type Description
    HudAnimationTrigger

    WatchedElementId

    Declaration
    public string WatchedElementId { get; }
    Property Value
    Type Description
    string

    Methods

    SetLayer(ProceduralLayerSO, float)

    Sets the layer this animation plays and its cooldown. Used by the builder tool.

    Declaration
    public void SetLayer(ProceduralLayerSO animationLayer, float cooldown)
    Parameters
    Type Name Description
    ProceduralLayerSO animationLayer

    The ProceduralAnimator layer this animation plays.

    float cooldown

    Minimum time between two plays of this animation, in seconds.

    SetTrigger(HudAnimationTrigger, string, string)

    Sets what makes this animation play. Used by the builder tool.

    Declaration
    public void SetTrigger(HudAnimationTrigger animationTrigger, string watchedElement, string signalType)
    Parameters
    Type Name Description
    HudAnimationTrigger animationTrigger

    What makes this animation play.

    string watchedElement

    Id of the watched element; empty watches the owning element's own value. Value triggers only.

    string signalType

    Assembly-qualified signal type for the ON_SIGNAL trigger; ignored otherwise.

    Implements

    IHudElementAnimationDefinition
    In this article
    © 2026 Serenity. All Rights Reserved