I met the same problem, both freeze on android and editor. I queue the load action to resolve this problem.
But I think it should be a bug, have find a better way to deal with it?
if I comment unload line everything seems ok for me (apart from memory leaks). Issue reproduces if asset bundles didn’t cache yet and also appears in older versions of unity. Please keep me in touch if you will found a solution
hello guys( @anton-melegov , @Szzwp , @watsonsong ), we encountered something similar, and for us it worked the fallowing workaround:
AssetBundleCreateRequest request = AssetBundle.LoadFromFileAsync(Application.streamingAssetsPath + assetBundle);
yield return request; // wait for the asset bundle to load;
AssetBundle tempAB = request.assetBundle;
AssetBundleRequest abr = temp.LoadAllAssetsAsync();
yield return abr; // wait for all assets to be loaded in ram and video ram
myassetBundle = tempAB;
// now you can load any resources you want
myassetBundle.LoadAssetAsync(path);
the trick is to wait for all the resources to be loaded (async so no major freeze will be encountered)
and all the loadassetAsync will return most probably with the asset already loaded, so it will be done before the next loadassetasync will be called. We didn’t had a lot of time to test exactly what it’s happening, but we haven’t encountered any other freeze after we implemented this.
I hope it helps someone