Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Problem with Addressables on WebGL build in 2019.3.4f1

Discussion in 'Scripting' started by tom_mardis, Mar 31, 2020.

  1. tom_mardis

    tom_mardis

    Joined:
    Mar 11, 2020
    Posts:
    10
    I'm getting an error in my WebGL build after every 2nd time I load an addressable. The first time I instantiate the addressable it works fine, the 2nd time, I get this error:

    UnityEngine.AddressableAssets.Initialization.InitializationOperation, result='', status='Succeeded' - Chain<GameObject,IResourceLocator>: ChainOperation of Type: UnityEngine.GameObject failed because dependent operation failed
    Dependency operation failed with System.Exception: Dependency Exception.
    (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

    If I clear the cached database object in Chrome's chrome://settings/siteData page and reload, it works again.

    I've tried both debug and release builds and neither worked, and I've tried clearing and rebuilding the addressable objects in the Unity editor (They're prefabs, two of them)

    For a little more context, this is the code I'm running to instantiate the prefabs:

    var handle = Addressables.InstantiateAsync(address);
    yield return handle;

    if(AsyncOperationStatus.Failed == handle.Status) {
    Debug.Log("Failed to instantiate addressable: " + address);
    } else {
    SimData.slide_GO = handle.Result;
    }
     
    Last edited: Mar 31, 2020
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,762
    I can't seem to find anything useful in the Addressibles documentation. It's super-spare as far as details, at least compared with the regular UnityEngine docs. I pointed this out in the feedback section that more examples and a direct linkage to the Scripting API would be useful, since google won't take me there by any search I can concoct.

    If addressibles are anything like asset bundles, once you loaded an asset bundle you couldn't reload it until you unloaded it. Perhaps that's what's going on but without documention all I can do is speculate. Good luck if you can find the docs and find anything useful in there.
     
  3. tom_mardis

    tom_mardis

    Joined:
    Mar 11, 2020
    Posts:
    10
    Thanks for responding! Yah documentation and examples are scarce.

    That's a good guess, for Webgl, if I refresh the webgl component loads from the web cache, is it possibly loading the addressables up in memory since they're cached? And when I try to use the
    Addressables.InstantiateAsync maybe it's seeing they're already loaded?
     
  4. tom_mardis

    tom_mardis

    Joined:
    Mar 11, 2020
    Posts:
    10
    Looks like it's just broken in 2019.3.4f1 :(

    I re-setup my project in 2019.1.0f2 and it works fine.
     
  5. Racines

    Racines

    Joined:
    Jan 20, 2014
    Posts:
    31
    Same problem here. With Unity 2019.3.0f6 and 2019.3.13f1.
    Finally updating Addressables from verified version 1.1.10 to unverified version 1.12.0 works.