logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudHostComponentAnimatorTests

    PlayMode characterization tests for the two UnityHudHostComponent pieces UnityHudHostComponentTests never exercises: the shared ProceduralAnimatorComponent lifecycle (BuildAnimator/EnsureAnimator/TearDownAnimator) and the safe-area anchor write gated by _appliedSafeArea in Update. A sibling file rather than an addition to that suite, which already sits at the file-size ratchet.

    Inheritance
    object
    UnityHudHostComponentAnimatorTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.UnityGameUi.Tests.Infrastructure
    Assembly: Tests.dll
    Syntax
    public class UnityHudHostComponentAnimatorTests
    Remarks

    These assert CURRENT behavior ahead of the host's planned collaborator split — including one surprise: HideHud_DoesNotTearDownTheAnimator() documents that HideHud only toggles element visibility and never calls TearDownAnimator, unlike Clear and a HUD switch.

    Constructors

    UnityHudHostComponentAnimatorTests()

    Declaration
    public UnityHudHostComponentAnimatorTests()

    Methods

    AppliedSafeArea_UnchangedScreenSafeArea_SkipsRewritingAnchors()

    Declaration
    public void AppliedSafeArea_UnchangedScreenSafeArea_SkipsRewritingAnchors()

    Clear_TearsDownTheAnimatorAndClearsTheField()

    Declaration
    public IEnumerator Clear_TearsDownTheAnimatorAndClearsTheField()
    Returns
    Type Description
    IEnumerator

    EnsureAnimator_CalledTwice_ReusesTheSameInstance()

    Declaration
    public void EnsureAnimator_CalledTwice_ReusesTheSameInstance()

    HideHud_DoesNotTearDownTheAnimator()

    Declaration
    public void HideHud_DoesNotTearDownTheAnimator()

    OnElementAnimationRequested_WithNoAnimatorBuilt_DoesNotThrow()

    Declaration
    public void OnElementAnimationRequested_WithNoAnimatorBuilt_DoesNotThrow()

    RespectSafeAreaFalse_LeavesAnchorsUntouchedAcrossUpdate()

    Declaration
    public IEnumerator RespectSafeAreaFalse_LeavesAnchorsUntouchedAcrossUpdate()
    Returns
    Type Description
    IEnumerator

    SetUp()

    Declaration
    public void SetUp()

    ShowHud_HudWithNoAnimatedElements_NeverBuildsAnAnimator()

    Declaration
    public void ShowHud_HudWithNoAnimatedElements_NeverBuildsAnAnimator()

    ShowHud_SameHudShownAgain_TakesTheFastPathAndKeepsTheSameAnimator()

    Declaration
    public void ShowHud_SameHudShownAgain_TakesTheFastPathAndKeepsTheSameAnimator()

    ShowHud_SwitchingToAnotherHudAndBack_TearsDownThenBuildsAFreshAnimatorInstance()

    Declaration
    public IEnumerator ShowHud_SwitchingToAnotherHudAndBack_TearsDownThenBuildsAFreshAnimatorInstance()
    Returns
    Type Description
    IEnumerator

    ShowHud_WithAnimatedElement_BuildsTheAnimatorOnceAndKeepsItAcrossFrames()

    Declaration
    public IEnumerator ShowHud_WithAnimatedElement_BuildsTheAnimatorOnceAndKeepsItAcrossFrames()
    Returns
    Type Description
    IEnumerator

    TearDown()

    Declaration
    public void TearDown()
    In this article
    © 2026 Serenity. All Rights Reserved