Hey so I’ve been trying to get into the practice of splitting my levels up into scenes. For my game in particular it has loads of useful applications. The environment will remain the same for some levels its just how the game plays that changes. So I kinda have each level split into a few different scenes representing Environment, Managers, Controllers and GUI.
Managers represent a global form of management in that they don’t affect the gameplay they essentially just provide a resource of some sort. Due to this they would need to load before anything else. Controllers represent gameplay control and directly control how the game is played. They depend on the managers to be loaded.
Basically Managers should load once and could sit throughout the entire life time of the application. Controllers will load on a per level basis. I’ve just started playing around with using multiple scenes to represent my levels and I can already see the benefits so keep in mind I’m not entirely sure if I’m doing this right.
I created a Manager Loader which will be used to load the managers. The execution order of that script is set to load first. My question and the issue is despite having execution priority it will still favor calling Awake on scripts in the Active scene before that of my manager scene. I can kind of understand why this is happening and the reasoning behind it. I think. However I’m not sure exactly how I should approach this so that the manager scene receives priority. Production wise I could easily just have it load before any game logic. Editor wise I’m not sure how to do this. Since when I click play all the scenes load at once. I could just set the Manager scene as the active scene although this appears to affect the Lightmapping so I’m guessing that is not the proper way of doing things.
So if any body has any advice how I should handle something like this I’d really appreciate it. Also what is the Active Scene exactly. In the documentation is describes it as the scene in which new objects are created in. Obviously there appears to be more to it than just that. Also what kind of scene should typically be set as the active scene? Environment, Controllers, GUI etc