docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Job system in Entities introduction

    The Entities package uses the job system to create multithreaded code. If you're concerned about performance, use jobs whenever possible.

    The following techniques are available, depending on the type of access you require:

    • Job scheduling: For convenient job scheduling, use IJobEntity. For more information, refer to Iterate over component data in multiple systems.
    • Manual scheduling outside the main thread: Use IJobChunk's Schedule() and ScheduleParallel() methods to transform data outside the main thread.

    When you schedule jobs, ECS keeps track of which systems read and write which components. Later systems' Dependency property include the job handles of earlier systems' scheduled jobs, in cases where the set of components' read and write operations overlap. For more information, refer to Job dependencies.

    For main thread access outside of the job system, use a foreach statement over the Query objects in SystemAPI. For more information, refer to SystemAPI overview.

    Additional resources

    • Job system introduction
    • Iterate over chunks of component data
    • Iterate over component data in multiple systems
    In This Article
    Back to top
    Copyright © 2025 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)