Thanks both. The game is at a prototype stage, so we're able to be a bit more flexible with porting, so if I may ask some more questions, let's go down this route.
In our MonoBehaviour implementation of the spawner, we have a coroutine that contains a for loop that spawns a group of enemies with data that is scoped to that for loop's lifetime.
I naively thought that I could simply scope this by having a system that starts a job, which starts another job within, but I'm told this is not supported.
So, I'm now trying to figure out how I can scope data to each group, so that enemies spawned for this group can take advantage of chunking.
One idea was to spawn a group entity which then instantiates enemies with a "GroupData" component, but this is probably wasting memory, as the enemies would depend on the group entity and it could persist for the whole game, meaning that we have a pretty big chunk requirement if we wanted to spawn loads of groups. Otherwise, it could need to be deleted once the enemies are spawned...but I'd rather it be flatter, and we just allocate chunks for the enemies.
Another idea, and it's a sort of compromise, is to instantiate enemies with a marker component, marking them as "non-initialized".
Then I'd initialize them in a system looking for the "non-initialized" archetype, which takes the next required component data from a central buffer, sort of like a factory.
This also has me concerned about chunking, as this requires a chunk that would only ephemerally be utilized prior to the near instantaneous initialization of the enemy. Of course, we could just make this a really small sort of "staging" chunk so that it doesn't have too much of a footprint.
But honestly, I think it could be flatter still, as the staging chunk idea could be an issue if we try to initialize a ton of enemies at the same time.
Is there some general wisdom you could bestow on me, or even a known DOD pattern that I could leverage for this problem?
Thanks!