logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudSignalSerializationTests

    Regression tests for the real-world bug where the HUD signals' payload fields were readonly, which Unity never serializes — so a signal authored as a [SerializeReference] entry in a GameMode's enter/exit signal list (UnityGameModeSignalConfiguration) always arrived with a null payload. UnityEngine.JsonUtility applies the same "skip readonly fields" rule as Unity's main serializer, so it reproduces the bug/fix cheaply; the asset-level round trip is covered by UnityGameModeSettingsDefinitionEditorTests. These tests live in the Unity test assembly, not the pure Business suite, because UnityEngine.JsonUtility is an engine API.

    Inheritance
    object
    HudSignalSerializationTests
    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 HudSignalSerializationTests

    Constructors

    HudSignalSerializationTests()

    Declaration
    public HudSignalSerializationTests()

    Methods

    HideHudElementSignal_JsonSerializationRoundTrip_PreservesElementIdAndHudId()

    Declaration
    public void HideHudElementSignal_JsonSerializationRoundTrip_PreservesElementIdAndHudId()

    ShowHudElementSignal_JsonSerializationRoundTrip_PreservesElementIdAndHudId()

    Declaration
    public void ShowHudElementSignal_JsonSerializationRoundTrip_PreservesElementIdAndHudId()

    ShowHudSignal_JsonSerializationRoundTrip_PreservesHudId()

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