3 ms·
Depends, if you just need to update position/rotations you can use a TransformAccessArray which is supported with jobs+burst. When you need to pull data out of
by hesdeadjim 3y ago
Depends, if you just need to update position/rotations you can use a TransformAccessArray which is supported with jobs+burst.
When you need to pull data out of a dozen components to keep a renderer in sync, yea that’s not cheap. But there are ways you can flip things around, like have a job that outputs a native array containing condensed info about the entity that will be used for rendering. That avoids non-bursted random data access into the entity, but of course adds some additional complexity.
This approach won’t naively scale to thousands and thousands of GameObjects like all the (boring) “look ECS can do 10000000 entities at once” demos. I get so, so, so tired of “scale” being the only sexy reason why you pick DOTS. Both my games have a resident set of a couple hundred entities at any given time and still, DOTS works great for how we use it.