Hello, The main difference between ISystem and SystemBase is that ISystem can be burst compiled, SystemBase can't. ISytem also don't support the Entities.ForEach syntax, but SystemBase do support the idiomatic foreach syntax. If your game has a lot of systems, the fact that ISystem can be bursted will most likely improve your performance, but threading your code will require more work. On the other hand, if you work on a small game, with few systems, the trival switch between main-thread/single-thread/multi-thread provided by the Entities.ForEach syntax can greatly ease your developpement process. My personnal opinion on the subject is to always use ISystem. I prefer to have a consistent implementation style rather than mixing things up. I started using ECS with it's first experimental release, a few years ago, when we did not have the sugar coating of Entities.ForEach, so I'm used to the additionnal effort required by ISystem to multithread my code. Plus, my understanding is that Entities.ForEach may not be part of 1.0, when it goes out of experimental/preview, since the SourceGenerator it uses are much less performant than the SystemAPI one. glhf in your DOTS projects !
hI thx i see there is a bit more stuff than on CodeMonkey or TurboMakeGame for the 1.0 tutorial. But i see that the baker and baking system are launch on "start" and when they are destroyed ? In my code i tryed to past the code OnCreate but didn't work for the baking Isystem. I just added OnUpdate the state.Enabled = false; I will need to create some flashcard to assimilate this stuff cuz for now it's a totaly new way of programming.
Baker and baking system are run in their own world. They only run for authoring the entities in the editor so they are not part of play mode nor are they part of the build. Not sure what your issue is with OnCreate and OnUpdate.
@@WAYNGames i suppose i miss something there but baker is not only a editor tool right ? it's the only tool to add component to an entity ? I would like to write in french but will be bad for the other who are like me and trying to understand this paradigme. Aniway i will go further on the topic and i suppose after some time it will make sense
Nice video. Question tho: so which approach is better and which one you use the most? To me idiomatic seems little bit more concise so I would probably use it. Also burst is pretty important when it comes to compilations so would also probably use ISystem interface, but it is just a wild guess, that's why I asked my question
Thanks for the question. Personally, I will use the ISystem and idiomatic foreach. There is a couple reason for my personal choice. First, I don't want to have two different kinds of syntax in my project. Second, I find that trying to burst as much code as possible lead to two things. Better performance. And better code separation. Since you can't use class with burst you can't just add a reference to whatever across your code base. You must think about what you do and how you do it. That being said, the SystemBase can be inherited which may be useful in some specific situation. Also, DOTS is not full featured yet. If you want to animate or play audio or VFX, you'll have to leave burst and reach back into MB and GO world. Systema Base and Entities.ForEach mays be more convenient in that situation.
When I use the Entities.ForEach I can get a reference to the Entity itself, when I use the idiomatic foreach in an ISystem, it seems I cannot. Is there any way in an ISystem to get a reference (to store in a quadrant system) to the Entity currently being iterated?