Async loading and prefab instantiation

Hi everyone,
I’ve recently reorganized my project into different scenes, and now I have the following setup:

  • Bootstrap Scene: Responsible for displaying a loading screen and asynchronously loading other scenes:
    • GameUI Scene
    • Game Scene

I don’t have a menu for now.

But now I have this issue : when the Game Scene loads, it instantiates prefabs (my game board and units). However, these prefabs are instantiated in the Bootstrap Scene because it is still the active scene. It’s only after all my scenes have loaded that I call SetActiveScene on my Game Scene.

Am I forced to set up a callback on an event triggered at the end of my scene-loading process (after calling SetActiveScene) to start my code? Or is there a way to anticipate the SetActiveScene so it takes effect while the Game Scene is still loading?

I see 2 solutions here :

  • Use “MoveGameObjectToScene” after all my instantiations
  • Delay Instantiation with a callback on a “OnAllScenesLoaded” Action

Do you see any other solution ?
Which solution would you choose and why ?

Thanks in advance for your answers.