title: Unity start() called before scene is fully loaded
body: <p>I ran into this article <a href="https://docs.unity3d.com/Manual/MultiSceneEditing.html" rel="nofollow noreferrer">Multi-scene editing</a>, and at the bottom of the tips and tricks section, there's the following sentence: "It is recommended to avoid using DontDestroyOnLoad to persist manager GameObjects that you want to survive across scene loads. Instead, create a manager scene".
  I decided to try this out, since my current game has a manager which uses DontDestroyOnload().</p>
  
  <p>Now say I have 3 scenes:
  1) StartScene
  2) Manager
  3) Level_01</p>
  
  <p>In <strong>StartScene</strong>, I do this to have the manager permanently loaded from the beginning:</p>
  
  <pre><code>void Start()
  {
      SceneManager.LoadSceneAsync("Manager", LoadSceneMode.Additive);
  }
  </code></pre>
  
  <p>In <strong>Manager</strong>, I have a <strong>script called SceneLoader</strong></p>
  
  <p>In SceneLoader, I do this:</p>
  
  <pre><code>void Update()
  {
      Debug.Log(SceneManager.GetActiveScene().name);
  }
  
  public void LoadScene(string sceneName)
  {
      StartCoroutine(LoadSceneAsync(sceneName));
  }
  
  IEnumerator LoadSceneAsync(string sceneName)
  {
      Scene currentScene = SceneManager.GetActiveScene();
      AsyncOperation sceneLoadingOperation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Additive);
      while(!sceneLoadingOperation.isDone)
      {
          yield return null;
      }
      SceneManager.UnloadSceneAsync(currentScene);
      SceneManager.SetActiveScene(SceneManager.GetSceneByName(sceneName));
  }
  </code></pre>
  
  <p>I also have a button called Start.
  When I press the button, the method LoadScene() is called.</p>
  
  <p>In <strong>Level_01</strong>, I do this:</p>
  
  <pre><code>void Start()
  {
      Debug.Log("Level_01 start called");
  }
  </code></pre>
  
  <p>Now here's <strong>the problem</strong>:
  <strong>I expect the Console output to be this:</strong></p>
  
  <p>StartScene (output by SceneManager.CurrentlyActiveScene)</p>
  
  <p>Level_01 start called (output by Start() in Level_01)</p>
  
  <p>Level_01 (output by SceneManager.CurrentlyActiveScene)</p>
  
  <p><strong>Instead, the Console output is this:</strong></p>
  
  <p>StartScene (output by SceneManager.CurrentlyActiveScene)</p>
  
  <p>Level_01 start called (output by Start() in Level_01)</p>
  
  <p>StartScene (output by SceneManager.CurrentlyActiveScene)</p>
  
  <p>Level_01 (output by SceneManager.CurrentlyActiveScene)</p>
  
  <p>Which means that the Start() function of the Level_01 scene is called BEFORE the CurrentlyActiveScene is set, and that the CurrentlyActiveScene is only set on the following frame.</p>
  
  <p><strong>Question</strong>: How can I make sure that the Start() function is only called after the CurrentlyActiveScene is set?</p>