Hello everyone, I need to ask you something. Will having a lot of levels ( different scenes of course ) cause the game run slowly, or does it have any bad side-effects on the game ? I just wonder that, thanks :).
There isn’t really any performance problem with having a lot of scenes in your game - you will usually only have one scene loaded at a time (unless you are loading levels additively). The only run-time consideration is that there is usually a small pause while loading in a new level.
Logistically, however, having a lot of levels can cause you grief during development. Unity opens/closes each scene when building the game into an executable, which becomes a longer and longer process as you have more scenes. You must also manually add the scenes to the Build Settings scene list, which is error-prone; if a scene isn’t included in this list, you will experience a soft-crash in game if you try to load it. Unity doesn’t give you any indication while building that you are missing a scene, which can lead to nasty surprises while testing or worse, in published titles.
Finally, depending on your game’s structure, having a lot of separate scenes can cause issues when making changes. For example, let’s say that every scene in your game has a particular element that you want to change. Hopefully you’ve made it into a prefab and everything is linked, or you’ll have to open each scene separately and make the change!