{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method CreateSystem | Entities | 1.2.0-exp.3
docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method CreateSystem

    CreateSystem<T>(World)

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

    Declaration
    public static SystemHandle CreateSystem<T>(this World self) where T : unmanaged, ISystem
    Parameters
    Type Name Description
    World self

    The World

    Returns
    Type Description
    SystemHandle

    The new system instance's handle 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 function 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 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.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the system type Thas not been registered with the TypeManager.

    In This Article
    Back to top
    Copyright © 2023 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)