- Home /
Why unity doesn't have build-in option to select what scene to load first on play ?
When having a Boot Scene with manager object while im working on an other scene, i must change the scene to hit play in the designer to test... so my managers are loaded then return to my work scene when test are done, its anoying !!! And the Boot scene strategy comes from the (Unity Learning program).. so why the option is not embeded.
Solution ?
Answer by Bunny83 · May 14, 2020 at 09:56 AM
Because Unity is an editor to edit your game / scenes. The playmode is there to just test a scene. If you have a boot scene requirement you can simply add a small script to each scene which checks if your "singleton" / whatever you need from your boot scene is there. If not just load the boot scene.
However keep in mind that such a setup would make it difficult to actually test a scene in isolation. This might work for your case when you can reach each and every scene from the main scene. However a game with linear progression through several levels would be a pain if you had to start from the first scene every time.
While boot scenes are quite common, it's generally better to not rely on them. A good video how to avoid / workaround singletons is this one by Ryan Hipple (Schell Games). However there are of course countless of other approaches. To be able to test a single scene directly it would also help if the boot scene can be loaded additively on top of the current scene if it's not loaded yet. Of course this requires some care about dependencies but in the end it simplifies the workflow and might even help to reduce dependencies (which we generally try to avoid; there's also a great example of "dependency-hell" in the video).
Answer by Ticool · May 15, 2020 at 02:38 AM
Wow man... it changes everything... thats the good way to do thing :) and that was what im looking for... so mutch video on unity learn and youtube with people taking their way to do things but its not THE WAY do do it right !!!
Thx you help me alot !!!
Your answer
Follow this Question
Related Questions
Unity networking, access online scenes variable in network manager 2 Answers
Does Unity have an equivalent to CCDirector? 1 Answer
How to load a scene additive and set as ActiveScene before their Start() methode is called ? 1 Answer
Why does loading the scene not work? 2 Answers
How to stop loading of a scene that's loading using SceneManager.LoadSceneAsync ? 1 Answer