I realize this may be a stupid question, but is it possible to use subscene without converting game objects to and from entities? I want to split up very large scenes into smaller chunks for streaming in and out of memory, and to prevent the main scene size from ballooning out into infinity, but I DON'T want to write custom baking and authoring scripts for hundreds of different existing mono behavior scripts. Is it possible to load the subscenes normally, with game objects, or do I have to roll my own solution?
#subscene issue
1 messages · Page 1 of 1 (latest)
The answer is no, subscenes are just entity data.
But isn't what you want just normal scenes?
Well yes, but I want to be able to organize these scenes the same way as Unity does for subscenes in my hierarchy, and I want to be able to have my game world split into separate scenes and stream them in and out of memory for the reasons I mentioned in my post.
You can have scenes inside of scenes
Well how does that work? You can't drag and drop a new scene into a different scene, from what I can tell.
From what I can tell, you cannot just put a scene into another scene.
You can right click on a scene in the project window
And simply click on Open Scene Additive
And then when you wanna remove it you can simply right click in the hierarchy and remove the scene
Oh mb
I thought that is what you meant by dragging in scenes into other scenes
I'm not asking if I can open multiple separate scenes independently in the hierarchy. I'm asking if a scene can be contained in a separate scene asset. What you're talking about is loading two separate scenes at the same time.
Essentially, I need to split up a very large scene into smaller chunks, and they need to be their own scenes. I want to be able load those scenes in and out of memory.
Yeah you can just load them up additively when needed and unload them when they are not being used anymore
I want to organize them in the hierarchy the same way that Unity organizes subscenes.
Ie, not viewed as a separate open scene in the hierarchy view, but rather as something that is part of the existing scene.
The only thing I can think of is to use a gameobject that when opened or closed, moves all of its children to the scene whose asset it references. And then somehow hide an open scene in the hierarchy window.
But I don't know if hiding open scenes in the hierarchy window is possible.
Well if you have it under one object you could just disable that
But still at the end of the day you are opening scenes additively
The only things you are stating to change is the
Hierarchy preview of the scene and it being hidden which can simply be achieved by unloading the scene
Again, that isn't what I'm looking to accomplish. Thank you though.
No, a scene cannot contains other scenes. You have to load smaller scenes by code.
https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.Additive.html
Thanks. I'm in the process of rolling my own solution. Currently have a very similar hierarchy view to the ECS subscenes, using the EditorApplication.hierarchyWindowItemOnGUI callback.