#Best Practices for SubScenes?

1 messages · Page 1 of 1 (latest)

icy ridge
#

I have a question regarding the ECS/DOTS setup. Whenever I've seen examples of Baking it only is about 1 gameobject being turned into an entity and the components that come with it in one sample scene. But in a real world example, I can't seem to really find what the best practice is. Is the best practice to have multiple Sub Scenes in different parent scenes, one for each Gameobject you need to Bake, or is the idea that you have many sub scenes within the same parent scene?
It's not clear from the documentation I've looked through so far.

#

In my own setup I wish to have:

  • Many different turrets that shoot bullets with travel time
  • Many different units that all move towards a central point (let's call those units Monsters)

So given the above:

  • In an example like that, would I need to make a Scene per Monster/Turret I want to make, with a SubScene in each for baking?
  • Or would I instead make a parent scene with lots of SubScenes in it to do all the baking?
  • Do I simply make a config object and populate it with Prefabs that I then turn into Entities without making SubScenes for each?

I can't really find out how a real world example would work for baking many different types of data structures like this.

storm geode
#

you can have many GOs inside subscene so it's possible to bake everything you need with only one subscene in project

icy ridge
storm geode
eternal cobalt
#

because subscene bake time increases

#

you probably should use EntityPrefabReference

#

it's a loose reference to entity prefab which can be loaded async

#

in runtime

#

as well as unloaded

icy ridge
eternal cobalt
#

not sure

#

haven't looked at samples for a long time

swift python
#

Here you go 🙂

#

@icy ridge the other alternative if to do something like that :

#

& then you create a single Baker for your monsters

#

with differents parameters

#

But it's more tedious if you don't automate the process of collecting & identifying the prefabs later