docs.unity.cn
    Show / Hide Table of Contents

    Method GetExistingSystem

    GetExistingSystem<T>()

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

    Declaration
    public SystemHandle GetExistingSystem<T>()
        where T : ComponentSystemBase
    Returns
    Type Description
    SystemHandle

    A handle to 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

    GetExistingSystem(Type)

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

    Declaration
    public SystemHandle GetExistingSystem(Type type)
    Parameters
    Type Name Description
    Type type

    The system type

    Returns
    Type Description
    SystemHandle

    A handle to the existing instance of system type type in this World. If no such instance exists, the method returns default.

    GetExistingSystem(SystemTypeIndex)

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

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

    The system type

    Returns
    Type Description
    SystemHandle

    A handle to the existing instance of system type type in this World. If no such instance exists, the method returns default.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Thursday, August 10, 2023