This is probably a bug, but I wanted to check before I put in the time to make a repro.
I had some code that essentially did this:
AssetBundle.LoadFromFileAsync(path);
foreach(var scene in scenes) {
SceneManager.LoadSceneAsync(scene, LoadSceneMode.Additive);
}
This caused the asset bundle loading to get stuck at 0.9, and never finish. (Yes, allowSceneActivation was on). After digging a bunch, it turned out that this fixed it:
var loadOp = AssetBundle.LoadFromFileAsync(path);
yield return loadOp;
foreach(var scene in scenes) {
SceneManager.LoadSceneAsync(scene, LoadSceneMode.Additive);
}
This has to be a bug, right? I’m not sure if it’s a good idea to have the asset bundle load at the same time as the scenes, but it should be possible without breaking the bundle load.
you are loading the scenes synchronously.
there can be one loadOp active at a time, so the scene load waits for the bundle while blocking the frame, but the bundle loadOp is waiting the end of frame to complete. deadlock.
I’m already using Async, updated my post. I wrote the code instead of copy-pasting it because I wanted to strip out unnecessary info, sorry about that.
what happens if you try that with multiple bundles and/or multiple scenes? (without mixing them)
or if you start loading the scene, load the bundle and monitor the scene load progress?
also try other API than load from file.
do the scenes finish loading with your setup? or they are all stuck at 0.9?