logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityObjectUtilsTests

    Tests for UnityObjectUtils: the destroyed-object-aware IsAlive check and the GetOrAddComponent get-or-add helper shared across services/channels.

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

    Constructors

    UnityObjectUtilsTests()

    Declaration
    public UnityObjectUtilsTests()

    Methods

    GetOrAddComponent_OnGameObjectWithoutTheComponent_Should_AddItOnce()

    Declaration
    public void GetOrAddComponent_OnGameObjectWithoutTheComponent_Should_AddItOnce()

    GetOrAddComponent_OnSiblingComponent_Should_AddToItsGameObject()

    Declaration
    public void GetOrAddComponent_OnSiblingComponent_Should_AddToItsGameObject()

    IsAlive_DestroyedUnityObject_Should_BeFalse()

    Declaration
    public void IsAlive_DestroyedUnityObject_Should_BeFalse()

    IsAlive_LiveUnityObject_Should_BeTrue()

    Declaration
    public void IsAlive_LiveUnityObject_Should_BeTrue()

    IsAlive_Null_Should_BeFalse()

    Declaration
    public void IsAlive_Null_Should_BeFalse()

    IsAlive_PlainNonUnityObject_Should_BeTrue()

    Declaration
    public void IsAlive_PlainNonUnityObject_Should_BeTrue()

    TearDown()

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