If I have the scene open it’s considered “loaded” which will cause it to appear when pressing play, even when that means multiple scenes at the same time. It seems the only way to prevent it from starting when pressing play is to “unload” the scene, but then the whole thing becomes collapsed and not possible to edit in the editor. This is a big hassle because every time I want to test my game, I have to unload every scene except the main menu scene, then after testing I have to re-load them and expand all the arrows, etc.
Why do they have to be either both on or both off, even though it seems like these two things have nothing to do with each other (being able to edit in code, vs having it loaded when pressing Play)?
They have a lot to do with each other. The Hierarchy, Scene and Game tabs all show the same data, just with different views.
The Hierarchy shows the currently loaded scene(s) as a text based hierarchy.
The Scene view shows that same scene, by rendering its content from a camera controlled by the Editor, and with an Editor specific gizmo layer.
The Game view renders the exact same scene(s), but from the scenes’ own currently active camera.
That’s why you can’t have different things loaded in each. None of them “own” what they’re showing, they’re different views into the same data, which is loaded only once into the whole Editor.
Potentially helpful concept: I sometimes write Editor scripts which open the sets of scenes I want so that I don’t have to do it by hand every time. Eg: a script tagged as ExecuteInEditMode which checks if other dependent scenes are loaded, and loads them if they aren’t already.
1 Like