Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Clarifications needed about AssetBundle Dependencies

Discussion in 'Addressables' started by Kolyasisan, Dec 15, 2020.

  1. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    355
    According to the recent docs (https://docs.unity3d.com/Packages/c...moryManagement.html#mirroring-load-and-unload), starting from 1.13.0 Addressables calculates dependeny AssetBundles in a new way. Now, it's AssetBundles themselves that have dependencies on other ones, not asset themselves. This feels quite unexpected, so I want to ask some questions:

    -The docs state that it's done in order to fix the behaviour of broken references. Is that the only reason? It sounds more like a bandaid to a fundamental problem. Clarify me in case if I'm missing something (probably am).
    -Let's imagine a scenario: I have BundleA that contains AssetA and AssetB and also BundleB that contains AssetC. I load AssetA and AssetB, which also loads BundleB and AssetC. Now, let's say that I release AssetA. It's still in memory because the bundles are still opened. Then I call Resources.UnloadUnusedAssets, which will unload AssetA and AssetC. What will happen if I were to load AssetA again? What kind of a loading behaviour can I expect? Will it still be asyncronous or will it stall the main thread?
    -Do I properly understand that, in case if Uncompressed or LZ4 is used, "loading" an AssetBundle doesn't load any assets and those are loaded when requested either explicitly or as a dependency?
     
unityunity