I’m looking for some materials that would actually explain how I can utilize job systems with ECS, as every page just states that “jobs are multithreaded and safe” with no real information about how it works, why it is thread safe and limitations of it.
Ad I would want to know how I can integrate ECS with job system, can you create systems that works as a job? so multiple system can operate on components from multiple threads? If so, how is thread safety guaranteed or what needs to be done to make it safe? And if not, then how jobs can be used in typical game with ECS. Or maybe jobs are only useful for longer and more advanced operations, like transforming some data in the background and then using the result in main thread again? - so useless for typical systems.
Would be great to also read more about internals of ECS/job system, to know how actually such data is stored in memory etc.,I’m reading about ECS & jobs and after countless articles I still did not find more information than: It is safe and multithreaded because we say so. Without even explanation what can be processed in other threads etc.
So my question is how ECS and job system can work together and what are the limitations, in perfect system I would imagine that I only need to create few systems that operate on selected components and each system can run in different thread as long as they modify different components.
Is anything like that possible with ECS & Jobs? If yes - how it works, how unity know what can be running next to each other and what not. If not - then what exactly is possible, can I use jobs to modify components from another thread, or this is still limited to main one? And if I can modify them, then how thread safety is guaranteed (or not)?
I’m just looking for something that would explain both systems in detail, not just “it’s better and works”.