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
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
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.