When to use {X}System vs {Y}Job

Original Question: When is it best to use a systems vs directly working with jobs? What are the benefits of choosing one path vs the other?

Edit: Found the documentation I have been looking for:

JobComponentSystem at all times where possible.
ComponentSystem only if you have to work on some type of managed data or main thread operation.

As for job depends entirely on your problem. For me I’d say the frequency I use them is roughly in this order, from most to least frequently

IJobForEach - regular work
IJobChunk - optimized regular work - I often use to minimize allocations in jobs
IJob - small tasks between jobs - clear a container, resize a container, copy 1 container to another etc
IJobParallelFor - use it pretty rarely - much more useful when you aren’t directly working with entities.

I also use a bunch of other specialized jobs, such as the NativeMutliHashMap iterating ones, but also custom jobs I’ve written.

4 Likes