In JobComponentSystem::OnUpdate is previous job guaranteed to have finished?

Hi guys,

Just curious - when OnUpdate is called on a JobComponentSystem, is the previously scheduled job from that system guaranteed to have finished at that point, or do I need to store the handle and call Complete()?

EDIT: I have a NativeArray which I update in OnUpdate, and pass it into the job. I’m wondering whether I need to be careful about making sure the previous job is finished before changing the contents for the next job.

Cheers
J

Guaranteed to complete, otherwise you could schedule a chain that spans over multiple frames.

1 Like

If you schedule it with inputDeps as dependency, right?

1 Like

It just has to be wrapped up in the JobHandle you return.

That’s what I meant but did not say quite right.