#Multiple fields in a single Component?
1 messages · Page 1 of 1 (latest)
depends on how data is used: how many jobs read certain field, how many write
if you have everything in one component
that means any RW job will have to wait
for any other job
while if you split
and some jobs only RO some other field
your RW job may still run
Pretty much exactly what's said above. The ideal granularity for an ECS component is the smallest amount of data needed by any particular job. If most of your jobs need fields A/B/C but one of them only needs A/B, then maybe consider splitting field C into a separate component.
Taken to extremes, that means every field of every component should be its own component -- we should have PositionX, PositionY, PositionZ, etc. I don't think anybody's endorsing that as a real solution.