I’m trying to load several scenes during a splash screen. I’m able to load a portion of the scene properly - it’s the part that uses LoadSceneMode.Single. It will load into the background just fine and I can see progress on the load.
However, when I get to loading the additional scenes, progress never increments. This code just hangs in the second while loop.
AsyncOperation o = SceneManager.LoadSceneAsync(loadLevel);
o.allowSceneActivation = false;
while (o.progress < 0.9f) {
Debug.Log("Main scene loading: " + o.progress.ToString("F4"));
yield return new WaitForEndOfFrame();
}
AsyncOperation[] additionalScenes = null;
additionalScenes = new AsyncOperation[m_AdditionalLevelsMobile.Length];
for(int i = 0; i < m_AdditionalLevelsMobile.Length; i++) {
additionalScenes[i] = SceneManager.LoadSceneAsync(m_AdditionalLevelsMobile[i], LoadSceneMode.Additive);
additionalScenes[i].allowSceneActivation = false;
while (additionalScenes[i].progress < 0.9f) {
Debug.Log("Additional scene loading: " + additionalScenes[i].progress.ToString("F4"));
yield return new WaitForEndOfFrame();
}
}
This leads me to wonder if any type of loading ever happens if you set allowSceneActivation to false for an Additive level.
If I simply delay all loading of the additional scenes to when the new “main” scene is loaded, then my scene basically freezes for several seconds as the additional content is loaded up - which basically destroys the point of additive scene loading. So, am I doing something wrong here? Or is this some kind of bug?
I’m using Unity 5.6.0p2.