Search Issue Tracker
By Design
Votes
1
Found in [Package]
1.11.2
Issue ID
ADDR-1328
Regression
No
[Addressables] Default Build Script fails when an unrecognized Asset is included in the Group
How to reproduce:
1. Open the attached "1260134 repro" project
2. Open the Addressables Groups window from Window > Asset Management > Addressables > Groups
3. Make a new build by clicking Build > New Build > Default Build Script in the Addressables Groups window
Expected result: a warning stating that the unrecognized Assets will be stripped is thrown
Actual result: the build fails
Reproducible with: 1.11.2 (2018.4.24f1, 2019.4.2f1, 2020.1.0b14, 2020.2.0a16)
Not reproducible with: 1.15 (2018.4.24f1), 1.8.4 (2020.1.0b14), 1.9.2 (2020.2.0a16), 1.10.0 (2018.4.24f1, 2019.4.2f1, 2020.1.0b14, 2020.2.0a16)
Notes:
-The same issue reproduces with other types of unrecognized Assets, for example, .abc and .usdc files
-In package versions below 1.11.2 the following warning is thrown:
Type DefaultAsset is in editor assembly UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. Asset location with internal id Assets/3D Models/untitled.blend1 will be stripped.
-When the build fails the following errors are thrown:
Build Task GenerateBundleCommands failed with exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
SBP ErrorException
UnityEditor.GenericMenu:CatchMenu(Object, String\[], Int32)
Comments (2)
-
cpspace
Sep 02, 2024 16:13
Yep an index out of range exception does not seem like a designed error message. We should be told what the problem is - if there is a problem with a specific asset. Come on.!
-
Michael-Ryan
Dec 14, 2020 00:35
The issue isn't that the build is failing, it's that the generic ThrowArgumentOutOfRangeException is thrown instead of a custom exception that would actually be helpful, such as InvalidAddressableAssetTypeException (or a regular Error log). The first seems like an internal bug, while the latter looks more like user error. "Hmm. I received an InvalidAddressableAssetType exception. Perhaps I need to look at my setup."
It would be even more helpful to provide details on the asset that generated the failure.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
Resolution Note:
By design. This is a change in behavior to be more correct by failing the build when an asset is marked as addressable which we cannot build.