I know that Unity has certain limitations when it comes to scene management, but I can hardly believe that the thing I want to achieve is simply not possible to realize.
In my game you can build structures, whereupon the inside area of these structures is generated automatically (in a new scene), so that you can enter them. You can build as many structures as you want, thus it should be possible to create an infinite amount of scenes with dynamically (via input parameters) generated content.
Now, when I use SceneManager.CreateScene, it wonāt be added to build settings. And Iāve heard this isnāt even possible. But without the scene being in the build settings, it wonāt load, nor can I access it in any way.
The only possible solution that comes to my mind is that you can maybe have like a predefined amount of empty scenes available that the player is not likely to reach (with the structures built), and to store a gameobject in them that can be referenced to - to make initialization possible and solve the issue with the build settings. But is this a wise thing to do? It feels not right.
Do you have any other / simpler ideas how to resolve this?
Thank you very much!
Is the content generated during runtime? Then you could simply have one scene where you dynamically load the content. The scene would only have one GameObject with a component that does the loading.
Thank you for your answer! Basically, the content is generated during runtime. The problem with the āone scene solutionā is that I want the multiple scenes to run simultaneously (additively), because they represent inside and outside of a structure. Consequently, when the player enters a house for example, everything outside should remain as is, so overriding the scene with new content is not a feasible solution imo.
Donāt have the inside of the house as a scene. Instead, teleport the player to somewhere far enough from āoutsideā, and build a house from prefabs at runtime there.
Group dynamically created content for each āsceneā under its own parent game object, then disable/enable each of these game objects to display whichever āsceneā you want.