Multiple Scene or Subscene?

Hi!

From the normal Unity I’m used to having different levels and the main menu in different scenes.

In ECS everything is a bit different. Now I’m working on the save and load script and because the systems work independently from the scene I have problems to separate the logic of the main scene and the game scene.

The problem is that I have to create things in the main scene that I then need in the game scene. DontDestroyOnLoad doesn’t work with ECS and I haven’t seen a possibility yet. Do you have any ideas?

My idea was to take the little code and especially the canvas that makes up the main scene into the game scene and just switch it on and off there. I could activate or deactivate the rest via subscenes.

What do you think of this, how do you do it? Do you have a DontDestroyOnLoad option?

Greetings from Kojote

I have in my framework a DontDestroyOnSceneChangeTag and a scene management system. Depending on the project, I like to use scenes where the gameplay interaction is completely different. And I have a mechanism to enable and disable groups of systems depending on what scene is active. I only ever have 1 scene active at a time. If I need additive loading for things like streaming, I use subscenes.

1 Like

Thank you for the answer. How does this DontDestroyOnSceneChangeTag work?

https://github.com/Dreaming381/Latios-Framework-Documentation/blob/main/Core/Scene%20Management.md
https://github.com/Dreaming381/Latios-Framework/blob/master/Core/Systems/Scenes/SceneManagerSystem.cs#L71

1 Like