Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IJobExtensions

Contains extension methods for jobs implementing the IJob interface.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Class
  • Namespace: Unity.Jobs
  • Assembly: UnityEngine.CoreModule
public static class IJobExtensions

Remarks

The methods in this extension class add an instance of a job to the work queue, while IJob.Execute defines how to perform an asynchronous task. Use IJobExtensions.ScheduleByRef to request asynchronous execution, or IJobExtensions.RunByRef to execute the job immediately on the main thread.
Additional Resources: IJob.

Examples

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

Static Methods

Method

Description

EarlyJobInitGathers and caches reflection data for the internal job system's managed bindings.
RunPerforms the job's Execute method immediately on the same thread.
RunByRefPerforms the job's Execute method immediately on the main thread.
ScheduleSchedules the job for execution on a worker thread.
ScheduleByRefSchedules the job for execution on a worker thread.