logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.UnityGlobal.Infrastructure.Services

    Classes

    UnityInstanceActivator

    Unity-specific instance activator. Handles UnityEngine.ScriptableObject, UnityEngine.Component, and falls back to CreateInstance(Type) for plain CLR types.

    UnityMainThreadDispatcher

    Unity-specific main-thread dispatcher. Captures the UnitySynchronizationContext and dispatches calls to it when the target type or method parameters involve Unity API types.

    UnityReflectionCallTask

    Unity-specific reflection call task that inherits from ReflectionCallTask. Provides Unity instance activation (ScriptableObject, Component) and main-thread dispatching via UnityInstanceActivator and UnityMainThreadDispatcher.

    Applies a conservative dispatch policy: all reflected instance creation and method invocation are marshalled to the Unity main thread when a dispatcher is available, regardless of whether the method signature exposes Unity types. This is necessary because many methods use Unity APIs internally without exposing them in their signatures.

    In this article
    © 2026 Serenity. All Rights Reserved