docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Ways to schedule data changes

    The entity component system (ECS) has the following ways to manage structural changes within your project:

    • Entity command buffers (ECB)
    • The methods in EntityManager

    The difference between the two options are as follows:

    • If you want to queue up structural changes from a job, you must use an ECB.
    • If you want to perform structural changes on the main thread, and have them happen instantly, use the methods in EntityManager.
    • If you want to perform structural changes on the main thread, and you want them to happen at a later point (such as after a job completes), use an ECB.
    • The changes recorded in an ECB only are applied when Playback is called on the main thread. If you try to record any further changes to the ECB after playback, then Unity throws an exception.

    Additional resources

    • Entity command buffers overview
    • EntityManager overview
    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)