docs.unity.cn
    Show / Hide Table of Contents

    Method GetExistingUnmanagedSystem

    GetExistingUnmanagedSystem<T>()

    Return an existing instance of a system of type type in this World. Prefer the version that takes a SystemTypeIndex to avoid unnecessary reflection.

    Declaration
    [GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(BurstCompatibleSystem)})]
    public SystemHandle GetExistingUnmanagedSystem<T>()
        where T : struct, ISystem
    Returns
    Type Description
    SystemHandle

    The existing instance of system type T in this World. If no such instance exists, the method returns default.

    Type Parameters
    Name Description
    T

    The system type

    GetExistingUnmanagedSystem(Type)

    Return an existing instance of a system of type type in this World.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes System.Type")]
    public SystemHandle GetExistingUnmanagedSystem(Type type)
    Parameters
    Type Name Description
    Type type

    The system type

    Returns
    Type Description
    SystemHandle

    The existing instance of system type type in this World. If no such instance exists, the method returns SystemHandle.Null.

    GetExistingUnmanagedSystem(SystemTypeIndex)

    Return an existing instance of a system of type type in this World. This avoids unnecessary reflection.

    Declaration
    public SystemHandle GetExistingUnmanagedSystem(SystemTypeIndex type)
    Parameters
    Type Name Description
    SystemTypeIndex type

    The system type

    Returns
    Type Description
    SystemHandle

    The existing instance of system type type in this World. If no such instance exists, the method returns SystemHandle.Null.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023