Unity-Technologies / Unity-Technologies/BuildReportInspector

Fix support for AssetBundle Variants

Open
#48 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
424
Forks
61
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code in BuildReportInspector that maps SerializedFile names to AssetBundle names, then inspect how BuiltAssetBundleInfoSet could provide the needed association. Reproduce the case with AssetBundle variants and confirm that multiple bundles no longer cause an exception and are matched correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.