How to reuse my LoadingScreen scene, but tell it to go to a different level each time?

So I have the following scenes:
[Scene1]

[Scene2]

[Scene3]

[LoadingScreenScene]

And what I’m trying to do is to use the Loading Screen Scene as the transition multiple times for different levels, and to tell it to go to a different level each time. So the first time, tell it to go to Scene 2, and the second time to go to scene 3:

[Scene1] → [LoadingScreenScene] → [Scene2] → [LoadingScreenScene] → [Scene3]

So I’m wonder about how to achieve this. I’m guessing I would have to use DontDestroyOnLoad, but not sure exactly how to tell [LoadingScreenScene] to load a different level each time. Does anyone have any suggestion? :frowning:

This might be pretty crude, but you could have a static variable SceneToLoad on a manager gameObject with DontDestroyOnLoad. Something like:

static var SceneToLoad : String;

And then when the LoadingScreenScene starts, it checks that variable to see which level to load.

Application.LoadLevel(manager.SceneToLoad);

And you use another script to change SceneToLoad before you switch to the LoadingScreenScene.

manager.SceneToLoad = "Scene2"