Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unable to load dependent bundle from location

Discussion in 'Addressables' started by ttermeer-reboundcg, Dec 12, 2019.

  1. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    62
    Just putting it here if anyone stumble into the same error while upgrading a project which was using Asset Bundles. This happens when the Asset Bundle cached in Addressables becomes null due to external interaction.
    One way to produce that effect is using AssetBundle.UnloadAllAssetBundles after a resource has been loaded from Addressables.
     
    DetroitBrian likes this.
  2. DetroitBrian

    DetroitBrian

    Can't spell "Community" without "Unity"!

    Joined:
    Oct 17, 2019
    Posts:
    21
    Thanks for sharing!
     
  3. siisee11

    siisee11

    Joined:
    Sep 4, 2021
    Posts:
    3
    Any updates? I got Unable to load dependent bundle from location errors
     
  4. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    We can reproduce this by calling DownloadDependenciesAsync() with autorelease=true followed by trying to instantiate the same bundle immediately afterwards. Which seems like it would be a common pattern for downloading a bundle with a progress bar followed by loading immediately on completion.

    Addressables really is awful to use. I know binary versioning of arbitrary content is hard, but it's like an exercise in abstraction with a succession of authors adding more abstractions that fail to hide the underlying abstractions. The system is SO complex that it's an incredible amount of effort to even try to ask a sensible, understandable, reproducible question so that Unity employees (or anyone else) can help.
     
    kellan_ likes this.
  5. CChong_at_Infinity

    CChong_at_Infinity

    Joined:
    Apr 7, 2020
    Posts:
    27
    I'm coming across this issue now. Before, I was trying the new
    Addressables.CleanBundleCache()
    function to clear old outdated bundles (We're using Addressables 1.19.19).

    That didn't work, so I'm now trying to use
    Caching.ClearCache()
    instead. This works, in that it clears the cache, but I had to use
    AssetBundle.UnloadAllAssetBundles()
    beforehand and after that the game stops working because of this "Unable to load dependent bundle from location" error.

    The game works fine after force quitting it and restarting, but that's not really a solution.

    This error happens on both iOS and Android.