For performance reason, which are the best to load a desired stage from 100 stages ?

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 ?

What I would probably do is have 100 scenes and when you reach a point on the level, start loading the new scene and when you reach the end, set it as the active scene.
Here are some links to assist you. (Bit of a rush, let me know if you need more explanation)
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadSceneAsync.html

Can you explain how could this is the best approach for the best performance ?

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.

(Still rushed)

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 ?

try both. see what will do best for you

1 Like

I just remembered, Im certain the game Inside uses the technique I mentioned for performance reasons.
looks like theyve done the research for you.

EDIT:
Here it is:

https://www.youtube.com/watch?v=mQ2KTRn4BMI