Hello there.
I’m trying to make a loading scene for my game. The game have a MainMenu scene, a Game scene which contain the mail game mechanics and multiple Levelxx scenes which contains the levels assets.
I want to load both the Game and Levelxx scene asynchroneously, but I’m having quite a problem.
The main idea is to have :
void Start()
{
Application.LoadLevelAsync("Game");
Application.LoadLevelAdditiveAsync("Levelxx");
}
The issue is, when LoadLevelAsync finish its work, it change level immediately before calling LoadLevelAdditiveAsync. Fine. I’ll wait for it to finish working.
IEnumerator Start()
{
ASyncOperation gameLoad = Application.LoadLevelAsync("Game");
gameLoad.allowSceneActivation = false;
ASyncOperation levelLoad = Application.LoadLevelAdditiveAsync("Levelxx");
yield return levelLoad ;
gameLoad.allowSceneActivation = true;
}
This seems fine at first glance BUT the LoadLevelAdditiveAsync can’t load until the previously AsyncOperation is done, but it will never get done as I allow it after the LoadLevelAdditiveAsync is itself done, the scene loading just never end.
In all, I can’t find how I can load a level separated into multiple scenes with the async ops. Anyone know of a way to get it to work?