docs.unity.cn
    Show / Hide Table of Contents

    Method CreateSystem

    CreateSystem<T>()

    Create and return a handle to an instance of a system of type T in this World.

    Declaration
    public SystemHandle CreateSystem<T>()
        where T : ComponentSystemBase, new()
    Returns
    Type Description
    SystemHandle

    A handle to the new instance of system type T in this World.

    Type Parameters
    Name Description
    T

    The system type

    Remarks

    This can result in multiple instances of the same system in a single World, which is generally undesirable.

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running Jobs to complete before creating the system, and no additional Jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework may not be able to make use of the processing power of all available cores.

    CreateSystem(Type)

    Create and return a handle to an instance of a system of type type in this World.

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

    The system type

    Returns
    Type Description
    SystemHandle

    A handle to the new instance of system type type in this World.

    Remarks

    This can result in multiple instances of the same system in a single World, which is generally undesirable.

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running Jobs to complete before creating the system, and no additional Jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework may not be able to make use of the processing power of all available cores.

    CreateSystem(SystemTypeIndex)

    Create and return a handle to an instance of a system of with system type index typeIndex in this World.

    Declaration
    public SystemHandle CreateSystem(SystemTypeIndex typeIndex)
    Parameters
    Type Name Description
    SystemTypeIndex typeIndex

    The system type index

    Returns
    Type Description
    SystemHandle

    A handle to the new instance of system type with system type indextypeIndex in this World.

    Remarks

    This can result in multiple instances of the same system in a single World, which is generally undesirable.

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running Jobs to complete before creating the system, and no additional Jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework may not be able to make use of the processing power of all available cores.

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