LoadLevelAsync woes

Hi forums!

I’m trying to get Application.LoadLevelAsync working, but I’m running into some strange things. This is happening in 4.6, on a build.

If I set allowSceneActivation to false, the async.progress gets stuck at .9f forever, and async.isDone is never true. So this code gets stuck in the while(!async.isDone) loop forever:

AsyncOperation async;
public string levelName;

    public IEnumerator LoadThing() {
        yield return StartCoroutine(Load());
        
        //Fades the screen out, works fine.
        yield return StartCoroutine(FadeOut());

        async.allowSceneActivation = true;
    }

    IEnumerator Load() {
        async = Application.LoadLevelAsync(levelName);
        async.allowSceneActivation = false;

        text.text = "Async called, waiting for progress";

        while (!async.isDone) {
            //Will log "Progress: 90%" forever
            Debug.Log("Progress: " + (async.progress * 100) + "%");
            yield return null;
        }
    }

If I don’t set allowSceneActivation to false, the scene loads. That’s not really helpfull, as that doesn’t give me an async load.

The kicker is that this makes everything work nicely:

while (async.progress < .9f) {
   Debug.Log("Progress: " + (async.progress * 100) + "%");
    yield return null;
}

But it seems really hacky.

Am I using LoadLevelAsync wrong? To me, it looks like it’s hardcoded in that the async operation can’t be set to done or progress further than .9 unless it’s allowed to activate the scene. Which kinda defeats the purpose of the whole thing.

I just tried setting .allowSceneActivation = false, and I got stuck at 0.9f as well.

I think allowSceneActivation could be used, let’s say in a possible scenario, if you’re waiting for a backend response, to prevent loading just in case async operation finished loading the level earlier than fetching server data. That would be my guess. >_>