BuildReportInspector icon indicating copy to clipboard operation
BuildReportInspector copied to clipboard

Fix support for AssetBundle Variants

Open SkowronskiAndrew opened this issue 1 year ago • 1 comments

This issue was discovered in another copy of the code internal to Unity, but I think this could break some functionality in BuildReportInspector so i'm logging this issue to track it.

The code to determine the AssetBundle name from the SerializedFile name assumes this is a 1-1 mapping. However, when there is a AssetBundle variant, the same SerializedFile name is used for each variant (but different assetbundles).

This would cause the data structure to throw exceptions.

The exception could be avoided by permitting multiple bundles per file.

To be very accurate the code might need to be changed to use another approach to match back from the serialized file to the correct assetbundle. The "BuiltAssetBundleInfoSet" information inside the BuildReport probably could do this (but AFAIK its not exposed in the public API)

SkowronskiAndrew avatar Aug 28 '25 19:08 SkowronskiAndrew

(Next step would be to test a build including assetbundle variants to see what is actually broken)

SkowronskiAndrew avatar Aug 28 '25 19:08 SkowronskiAndrew