Hi all,
I’m starting a fresh ECS project and wondering what peoples’ thoughts are on best practices for Scenes and Subscenes. The documentation mentions the differences between authoring and entity scenes as well as Subscenes which can be a reference to either one, meaning previous workflows that only used a small handful of Scenes will potentially be a bit more complicated in ECS.
Given that Scenes themselves are incompatible with ECS I’m wondering what peoples’ thoughts are on how best to set up their projects. What are the main considerations you’re taking into account when splitting up your Scene(s)? Does a monolithic Scene still make sense in the world of ECS? Is there a better workflow with a lightweight Scene which references authoring / entity Subscenes that you swap between or open / close as needed? Is anyone even considering or working with a micro-Subscene kind of architecture with their project?
I’m sure there’s plenty of opinions on the subject, curious as to what people are finding works best for them and what kinds of issues they’ve run into.
1 Like
I don’t think there are any official best practices yet, but I usually have one scene loaded at a time, but that scene may contain many different subscenes. There are lots of ways to split up subscenes for different streaming or iteration workflows.
1 Like
Are your Scenes noticeably different with / without ECS, or is it basically the same just with Subscenes as a kind of catchall? Have you been splitting your Subscenes across packages (e.g. physics vs graphics / rendering) or functionality (e.g. combat vs UI) at all?
Mainly curious as to whether or not people have found any major issues given the new overhead - e.g. sharing objects between Subscenes or the like. I realize it’s all fairly new tech so people likely haven’t put it through the wringer yet, but if there are things people have already found useful / problematic it would help people (like me!) optimize their workflows early.
1 Like
Most things live in subscenes. So scenes themselves are much smaller with ECS than without. Otherwise there’s not a big difference.
You can’t split subscenes by packages, unless you also split your GameObjects by package and somehow tie them together with some cross-scene referencing mechanism. Not worth it in my opinion.
For procedural worlds, I will typically only have one subscene in a scene that contains all the spawners and configurations. For small designed levels, I may split subscenes by category (environment, enemies, ect) for faster iteration times since subscene import can be slow. For large worlds, I would split subscenes spatially so that they can be independently streamed.
4 Likes