Search Unity

Help Wanted Why does my bundle has dependencies?

Discussion in 'Asset Bundles' started by Noblauch, Jan 21, 2021.

  1. Noblauch

    Noblauch

    Joined:
    May 23, 2017
    Posts:
    252
    Hi, I have a problem debugging dependency issues, and I hope you can help!

    We are currently using the Addressables System to create our bundles, problem is, that sometimes there appear random dependencies between bundles.
    How do I find out the reason or the asset(s) that causes this?

    I already found one reason, by deleting scenes from the bundle until a unwanted dependency was gone, then going into the scene and deleting every game object until the dependency was gone again.

    It seems like we have a ton of these issues, which only showed up now as we are testing remotely. Of course I can't use this workflow for every issue, this would take forever. There must be a way to figure out what causes the dependencies.

    I found the AssetBundle Browser, and it gives me some kind of hash for dependencies:
    defaultlocalgroup.png

    But I can't make sense of these cab- hash things. And the browser doesn't let me search these as-well. How would one go about this?
     
    ProdiggaPA likes this.
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,661
    I'll flag this with the team. Which version of Addressables are you on?
     
  3. Noblauch

    Noblauch

    Joined:
    May 23, 2017
    Posts:
    252
    @TreyK-47
    We updated to 1.16.15 a week ago. I'm not sure if we are doing it wrong, but yep. These hashes are the only hints that we have, but they don't really help :s
     
    ProdiggaPA likes this.
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    611
    Hey @Noblauch so that AssetBundle Browser tool is fairly dated at this point and hasn't been maintained (to my knowledge) in quite some time. We don't have anything built in that actually shows the AssetBundle dependency tree at the moment. We could add a custom AnalyzeRule for this, or expose the BundleRuleBase to make it easier for you to make your own. Maybe we should do both. I'll add a feature request.

    Sorry I'm not more help than that. If you're ok with bringing the package out of the Library/PackageCache folder and into the Packages folder so you can edit it you could make your own child class of BundleRuleBase and use the write data of the build to construct the dependency tree.
     
  5. Noblauch

    Noblauch

    Joined:
    May 23, 2017
    Posts:
    252
    Hey @davidla_unity thanks for your reply!
    We are currently not really comfortable from removing the Addressables package from its managed environment.
    For now I implemented some post processes for our scenes to make sure everything is cleared out, even if its maybe unnecessary at times, but we managed to keep the inter-dependencies to a minimum now, without really knowing what caused them.

    I've used the package very intensely now for the first time in a real production, and I hope I'll find the time to share some feedback in the future. But we are still struggling with our deployment pipeline, so I'm still hoping that we will find a satisfactory solution for our last roadblocks.
    I'm sure you have quite a ton to do, but keep up improving the system! I'd love to use it in the next project, but the way it works for us now – no front – I'd probably manage the bundles myself to avoid days and weeks of troubleshooting.
    Keep up the good work!
     
    KarimTA likes this.
unityunity