Job extensions | Entities | 0.9.1-preview.15
docs.unity.cn
    Show / Hide Table of Contents

    Job extensions

    The Unity C# job system lets you run code on multiple threads. The system provides scheduling, parallel processing, and multi-threaded safety. The job system is a core Unity module that provides the general purpose interfaces and classes to create and run jobs (whether or not you are using ECS).

    These interfaces include:

    • IJob: Create a job that runs on any thread or core, which the job system scheduler determines.
    • IJobParallelFor: Create a job that can run on multiple threads in parallel to process the elements of a NativeContainer.
    • IJobExtensions: Provides extension methods to run IJobs.
    • IJobParalllelForExtensions: Provides extension methods to run IJobParallelFor jobs.
    • JobHandle: A handle to access a scheduled job. You can also use JobHandle instances to specify dependencies between jobs.

    For an overview of the jobs system see C# Job System in the Unity User Manual.

    The Jobs package extends the job system to support ECS. It contains:

    • IJobParallelForDeferExtensions
    • IJobParallelForFilter
    • JobParallelIndexListExtensions
    • Job​Struct​Produce<T>
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX