docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetOrCreateSystemsAndLogException

    GetOrCreateSystemsAndLogException(NativeList<SystemTypeIndex>, AllocatorHandle)

    Creates systems from the list of types which aren't already created in the current world.

    Declaration
    public NativeList<SystemHandle> GetOrCreateSystemsAndLogException(NativeList<SystemTypeIndex> types, AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    NativeList<SystemTypeIndex> types

    The system types to create, in the order in which they should be created.

    AllocatorManager.AllocatorHandle allocator

    The allocator to use to allocate the output system list

    Returns
    Type Description
    NativeList<SystemHandle>

    A list of system instances

    Remarks

    This function creates systems in the order they are passed in, and ignores CreateBeforeAttribute and CreateAfterAttribute validity. If errors are encountered either when creating the system or when calling OnCreate, a default SystemHandle will be returned for that system.

    Important: This function creates a sync point if any systems are created, which means that the EntityManager waits for all currently running Jobs to complete before creating the systems, and no additional Jobs can start before the function 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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)