How do I get call back when job complete?

How do I get call back when a job complete?

While you can poll the job handle to see if it’s complete, this is not really how you’re meant to develop.

You should just queue another job passing in the dependency of the previous job.

Hey Tertle,i just want to use job when create mesh and after that the mesh will set in to the meshfilter,so i need a call back

He is telling you that you can not get a callback if you want to use burst. You need to use the job system within it’s operational constraints.

@ununion what you need to know is when the job completes and at worst in 4 frames you should call complete on it. usually it is enough to schedule the job and then wait 2-3 frames and call complete and in the next line change the mesh. depending on your job count this might be a good idea to have a list of job handles and the frame they started and you can go through the list every frame and call complete on those 4 frames old or simply call complete the next frame or something in between depending on the number of jobs you start and the latency you can tolerate and the throughput needed and …

if (JobHandle.IsCompleted) JobHandle.Complete();

1 Like

thanks for you replying,finally i make it in a Coroutine

2 Likes