Addressable Loading on Andriod Unusable After 2019 -> 2020 Upgrade

We upgraded from 2019.3 LTS to 2020.3 LTS and addressables has been extremely slow on android. It takes 1-2 minutes to load in our levels while on 2019 it was under 1s even on low end devices.

Tried 1.18.4 and also the verified 1.16.19.

We were previously using 1.8.5. (on 2019.3LTS)

The only two ways we load them are:

Addressables.LoadAssetAsync(assetRef);

and

Addressables.InstantiateAsync(resourceLocation, Vector3.zero, Quaternion.identity);

When profiling, it looks like it is not doing much of anything during the ā€˜loading’ time. 95%+ waiting around.
Tried to do some debugging and narrowed it down to this call taking the most time (takes a few mins)

The assetList contains 12 prefabs

foreach (var assetRef in assetList)
{
    if (_instances.ContainsKey(assetRef)) continue;
    var op = Addressables.LoadAssetAsync<GameObject>(assetRef);
    op.Completed += handle =>
    {
        _instances.Add(assetRef, handle.Result.GetComponent<EntityComponent>());
        Interlocked.Increment(ref _assetsLoadedCount);
    };
}

Basically loops through a list of AssetReference and loads them async. When all of them are loaded, then the Addressables.InstantiateAsync is called to load the level prefab (this is quick in comparison) 50ms.

Are there some bugs or something I am doing wrong?
The code we used to load the AssetReferences work as expected in 2019.3 LTS (Addresables 1.8.5) but really slow in 2020.3 LTS

Thanks

Some updates after testing.

The last ā€œworkingā€ version for us is 1.13.1

Versions 1.15.1 and after will load, but takes a few minutes for AsyncLoad
1.14.2 will crash, giving the exception found here . Unable to cast object of type ā€˜SceneProvider’ to type ā€˜IResourceProvider’. It seems this was fixed in 1.15+

1.13.1 loads properly (same as 1.8.5).

Thanks for the update! If you haven’t yet, please file a bug report for us so that our QA team can have a look.

hi @xjjon

I have came across similar issue, have you found any solution for this?

TIA.

I think either upgrade Unity version or use older addressable version. In our case we kept 1.13.1 addressables on Unity 2020.3 LTS

1 Like

I ran into a similar issue upgrading to Unity 2021.3, where the asset loading thread would just stall for an extra few seconds and do nothing but addressables would not mark the operation as completed. I fixed it by adding the line
Application.backgroundLoadingPriority = ThreadPriority.High;
in my code before asset start loading.

Not sure if this was a change caused by engine upgrade or addressables upgrade, or if adding this code is just hiding the underlying problem.

1 Like

@lhicks Interesting are you using a newer Addressables version? There’s a new engine change in Unity 2021.2+ for downloading bundles. If the issue persists on the latest Addressables (1.20.5), is it possible to submit a bug ticket with a reproduction?