Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IJob

An interface that allows you to schedule a single job that runs in parallel to other jobs and the main thread.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Interface
  • Namespace: Unity.Jobs
  • Assembly: UnityEngine.ManagedKernelModule
[JobProducerType(typeof(IJobExtensions.JobStruct<>))]public interface IJob

Remarks

After a job is scheduled, the job's Execute method is invoked on a worker thread. You can use the returned JobHandle to make sure that the job has completed. You can also pass the JobHandle to other jobs as a dependency, which ensures that jobs are executed one after another on the worker threads.
Additional Resources: IJobForExtensions.ScheduleByRef

Examples

{code Tests/EditModeAndPlayModeTests/Jobs/Assets/DocumentationExamples/ManagedJobDocExamples.cs#ijob-apidocs-example}

Methods

Method

Description

ExecuteImplement this method to perform work on a worker thread.