Unity-Technologies / Unity-Technologies/BuildReportInspector
Fix support for AssetBundle Variants
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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