Im trying to understand - is there any benefits to use 1-thread job without Burst vs main thread?
I mean, what is the difference between this code (inside SystemBase):
Yes. The main thread could continue to do main thread work while that one-thread job is running. In addition, that one-thread job could run in parallel to other one-thread jobs.
WithStructuralChanges creates a specialized data structure for handling changes while iterating entities. Don’t use it unless you actually need to do structural changes.
Another one question: is there any reasons to use scheduled jobs without Burst if i only call EntityCommanBuffer commands (without any calculations) in compared with regular Run? I mean every structural changes execute in main thread, doesn’t matter where it comes from, am i right?
Structural changes with Run will induce a sync point right then and there, which forces all jobs to complete. If that’s a problem, then using Schedule with ECB can avoid that problem.
In addition I think that using the entity command buffer can (or will be able, not sure it’s already effective) to lead better performence on the changes due to batching the modifications.
So instead of
Creating an entity setting component A seting component B and repeating the operztion x times.
You’ll have
Create x entities
Set x component A
Set x component B