logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityInstanceActivator

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

    Inheritance
    object
    UnityInstanceActivator
    Implements
    IInstanceActivator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.UnityGlobal.Infrastructure.Services
    Assembly: Serenity.UnityGlobal.Infrastructure.dll
    Syntax
    public sealed class UnityInstanceActivator : IInstanceActivator

    Constructors

    UnityInstanceActivator()

    Declaration
    public UnityInstanceActivator()

    Methods

    CreateInstance(Type)

    Declaration
    public object CreateInstance(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    object

    RequiresSpecialContext(Type)

    Declaration
    public bool RequiresSpecialContext(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    bool
    Remarks

    Returns true for any type derived from UnityEngine.Object, as Unity API calls must be made on the main thread.

    Implements

    IInstanceActivator
    In this article
    © 2026 Serenity. All Rights Reserved