I created a loading screen to display a loading animation as the next scene is loading. I load the next scene asynchronously with:
yield return SceneManager.LoadSceneAsync(scene,LoadSceneMode.Additive);
And also set Application.backgroundLoadingPriority = ThreadPriority.Low;
, but the behaviour is still the same as a regular level load.
Am I missing something?
Expected behaviour:
- Exit level, and fade out.
- Loading screen appears.
- Once load is done, fade loading screen out.
- Fade in next scene.
What is happening:
- Exit level, and fade out.
- Loading screen appears, frozen
- Suddenly new scene fades in.
Once the load starts, the game just frezees, like with a regular Scene load.
I read that you have to set allowSceneActivation = false
, so you can fade the loading screen out, and then set it to true
to let unity finish loading, but this completelly freezes my game, like the async operation never finishes loading.