Function CommandBuilder.DisposeAfter

DisposeAfter (JobHandle dependency, AllowedDelay allowedDelay=…)

Disposes this command builder after the given job has completed.

Public
void DisposeAfter (

JobHandle

dependency

The job that must complete before this command builder is disposed.

AllowedDelay

allowedDelay=AllowedDelay.EndOfFrame

Whether to block on this dependency before rendering the current frame or not. If the job is expected to complete during a single frame, leave at the default of AllowedDelay.EndOfFrame. But if the job is expected to take multiple frames to complete, you can set this to AllowedDelay.Infinite.

)

Disposes this command builder after the given job has completed.

This is convenient if you are using the entity-component-system/burst in Unity and don't know exactly when the job will complete.

You will not be able to use this command builder on the main thread anymore.