"Loading scene" (progress bar) that should not destroy until my own stuff ended

I have a menu scene and a game scene. I’d like to create a loading scene with a progress bar that indicates the state of loading.

The problem is, that switch of scenes is not as long operation. But after my game scene is loaded it starts some procedural generation of level stuff that rly takes long time, and that’s what i’d like to indicate in my progress bar.

How can I not to destroy my loading scene as soon as my game scene is loaded (in terms of unity). I need it to be alive until my generation ends.

Generally, how to switch scenes (atleast visually) as soon as programmer gives a signal himself?

Hi @laralex do you know that unity have animation and animator, I think you shouldn’t make a “loading scene”, maybe you just have to put our loading screen on the main menu and when you click something-> the loading screen is active and you make some delay until the loading is finish. and then you change the scene.