View Built Bundle Contents

Issue #16 resolved
James Marr created an issue

Background

A large pain point for my team is understanding what exactly got included inside of a bundle through automatic dependency gathering. This mainly happens when we put a UI prefab inside of a bundle, which brings along with it all of the heavy weight sprite assets it references. This can be particularly bad when a relatively small dependent sprite has been packed on a larger sprite sheet, because then the entire sprite sheet then gets included in the bundle.

For our Live Operations team, this is extremely frustrating and time consuming to mitigate. They put together what they believe is a relatively simple piece of UI, but then it results in a several megabyte bundle because it accidentally brought in huge sprite sheets through dependency gathering. There are several ways to mitigate this problem, but it's currently very difficult for them to track down what the issue is so that they can put a fix in place.

There simply aren't good tools for them to understand what exactly got put into a bundle by Unity. They have to resort to a clunky work flow of looking at the editor log, which thankfully does show the entire asset contents and sizes of bundles as they are being built.

Proposal

You may decide that ABGT is the wrong place to solve this problem, but I personally feel like you guys are well positioned to do it so I'll ask anyway.

There should be a button to allow you to view the full results of a build command. This would show the final list of all bundles built, what assets were explicitly added to each bundle, and what assets were included in each bundle due to automatic dependency gathering. Ideally, this output would also include the size of each asset.

There are several ways to accomplish this:

• Parse the editor log

• Explicitly call AssetDatabase.GetDependencies for each asset ABGT adds to a bundle. Compare dependencies between bundles to determine what asset will be added to wha3. t bundle.

• Convince the main Unity team to enhance BuildPipeline.BuildAssetBundles to give programatic access to this data.

Followup

I fully understand that this isn't a fast or easy thing to accomplish. I'm bringing this to your attention because I see ABGT as a major push forward in terms of asset bundle usability. Thus, I think you guys are in a good position to champion larger changes to further improve asset bundle usability.

Please follow up with me if you think you could benefit from more detail, explanation, or brain storm. I think my project is pretty high up there in terms of asset bundle usage, so we run into a lot of the issues that I think smaller projects might not.

Comments (14)

  1. Hiroki Omae

    Thank you for the practical proposal. I think we are able to create view to allow you to browse what is in built asset bundles, including what have changed since last build, so that you can quickly understand what have actually changed. Also, I would like to note that there is another group in asset bundle team working on creating tool to allow you to browse built asset bundles. Solution to this tool might be the combination of the two tools.

  2. Matt D

    Yeah +1 for this. I think this could really enhance it, maybe even adding in duplication checking or other similar checks.

  3. James Marr reporter

    Thanks Hiroki, this tool looks great! Getting this integrated with ABGT would be awesome!

    I'll check it out and give any feedback I have to that team. It looks like paulb-unity and stephen-palmer are the two main contributors. Just curious, how closely do your two teams work together?

  4. Hiroki Omae

    Thank you! I am working very closely with Paul and Stephen. You can directly give feedbacks to them on github, or you can write feedback here to keep the context of your feedbacks.

  5. Log in to comment