So let’s say I have 100 stages with different bosses, different boss attacks, different background image, and different boss stats but with same gameplay (for example fighting a boss in an arena).
Here are some options I have :
1.) Make an individual scene for 100 stages.
2.) Create one scene with a script that setup the scene based on what the player choose. So basically I tell the script to find the elements one by one using linear search and load them to the scene.
3.) Create one scene but this time I load all game elements at once right after the main menu is loaded, disable them and make them DontDestroyOnLoad. So when I want to play stage 1, I just have to enable all elements for stage 1 and disable them if I want to play another stage.
So my question is from those 3 options which one has the best performance to load a stage from 100 stages ?
First of all, Async, means that it would not freeze the game when loading the scene, assuming it probably runs in a different thread.(?)
Small explanation of threads: https://www.dotnetperls.com/thread
And, when you are done with the old scene, unloading with UnloadSceneAsync means that you can do it asynchronously and free up some memory.
isnt it that you have 100 scenes it takes more memory (needs better performance) then if you make prefabs out of the levels and just use 1 scene?
just spawn then in or have them in your scene and just enable and disable them.
Okay thanks for your opinions. While I consider that, I would like to see others opinions too.
I also think that making 100 scenes would affect the game’s performance though I’m not really sure about it.
So from my options above, which would you choose ?