Why does SceneManagement.SceneManager.LoadSceneAsync stop gameplay?

Hello, I am trying to load a level asynchronously while leaving the current level playable still.

Here it states I can load a level while still playing the current one or show a progress bar.

when I load the level asynchronously the game pauses.
I’m using this just to test its “ability”;

private var ao : AsyncOperation;

    function Update () {
    
        if(Input.GetMouseButtonDown(0)){
            Load();
        }
    
    }
    
  function Load(){
	Debug.Log("Loading");
	ao = SceneManagement.SceneManager.LoadSceneAsync(2);

	while(ao.progress < 0.9){
	Debug.Log("WAIT");
	return ;
	}
	
	Debug.Log("DONE");

   }

The current level stops, and then after the new level loads the debug messages come through.

Unity docs say:

Unity will completely load all assets and all objects in the scene in a background loading thread. This allows you to load new levels while still playing the current one, show a progress bar or create a completely streaming world where you constantly load and unload different parts of the world based on the player position, without any hiccups in game play.

It’s totally wrong.

Unfortunately, this has been the case with LoadLevelAsync since Unity 3.5 (that I know).

What actually is EXTREMELY slow, is not the actual loading of the level, but the last part, that is, the activation of the scene, that causes hiccups.

You should also be aware that in editor, this behaviour is worse. In our project, we get lots of hiccups when loading parts of the level (we have it all broken up and “streaming”). However, in a build, the levels load almost without a hitch.

Unfortunately there is no real way to get around it right now that I’m aware of. The best suggestion is to have all the objects in the loaded scene disabled. This way you’ll load it in and go through the activation part faster. You can then use a CoRoutine to defer the activation, and even cut it up into multiple frames, as to make it have less of a hiccup.