YieldUntilJobComplete Class

public sealed class YieldUntilJobComplete : YieldInstruction

A special wrapper for a unity YieldInstruction that can be used in combination with the Job System. This can be used in IEnumerator<YieldInstruction> based methods to tell the object driving the methods execution to yield until the job has been completed. This is very useful for adding job based parallelism.

Once the YieldUntilJobComplete is yielded, the jobHandle structure is copied by the World and the copy is referenced. As such, you should be able to freely reuse the YieldUntilJobComplete instance as many times as you wish; just make sure to assign a new JobHandle to it each time.

Fields

Name Type Default Value Description
jobHandle JobHandle

The job handle object that the object driving the enumerator method needs to wait to finish.