- Home /
Why is ECS better than actual Unity Entity-Component pattern ?
I have trouble understanding why technically speaking ECS will have better performances than the actual Unity Entity-Component pattern. I know that it will use the new C# Job System but is this the only reason ?
Because it was made Unity $$anonymous$$m that's all. They know Unity inside out so we trust them known better than Entitas $$anonymous$$m
"we trust them", well I actually trust them but what I want to know is where do the technical benefits of ECS come from.
"ECS is not ready for production". Quote from Github. You could expect right now they are not much very useful. But if it was made by Unity then the base of ECS must be on C++ like $$anonymous$$onoBehavior (I haven't check so not sure) which is fastest. Could be much faster than Entitas and Entity-Component(C# based).
And with Direct Burst Compiler support => could be same as C++ when decompile from code to build
So less overhead call from C# API -> C++ API i guess
Answer by Antypodish · Aug 18, 2018 at 09:05 PM
@Shashimee, because, it is how ECS utilities memory. Rather than in typical OOP, where memory data is scattered all over the place, ECS packs data tightly in chunks. Which allows rapid access to what is needed. Just to give rough pictured idea, it is kind of, like storing 2D array in 1D array and referring to row and column by single index offset. While in 2D array you need 2 indexes for row and column. So you go data nicely serialized.