When I try to build my project’s AssetBundles via Addressables (version 1.17.2-preview) I get this exception:
Build Task GenerateSubAssetPathMaps failed with exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <9577ac7a62ef43179789031239ba8798>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <9577ac7a62ef43179789031239ba8798>:0
at UnityEditor.Build.Pipeline.Utilities.ExtensionMethods.Swap[T] (System.Collections.Generic.IList`1[T] list, System.Int32 first, System.Int32 second) [0x00001] in C:\Users\Jesse\Unshared Code\Chromavaders\Library\PackageCache\com.unity.scriptablebuildpipeline@1.15.2\Editor\Utilities\ExtensionMethods.cs:27
at UnityEditor.Build.Pipeline.Tasks.GenerateSubAssetPathMaps.CreateSubAssetLoadInfo (UnityEditor.Build.Content.AssetLoadInfo assetInfo, UnityEditor.Build.Content.ObjectIdentifier subAsset) [0x00052] in C:\Users\Jesse\Unshared Code\Chromavaders\Library\PackageCache\com.unity.scriptablebuildpipeline@1.15.2\Editor\Tasks\GenerateSubAssetPathMaps.cs:63
at UnityEditor.Build.Pipeline.Tasks.GenerateSubAssetPathMaps.Run () [0x00132] in C:\Users\Jesse\Unshared Code\Chromavaders\Library\PackageCache\com.unity.scriptablebuildpipeline@1.15.2\Editor\Tasks\GenerateSubAssetPathMaps.cs:45
at UnityEditor.Build.Pipeline.BuildTasksRunner.Run (System.Collections.Generic.IList`1[T] pipeline, UnityEditor.Build.Pipeline.Interfaces.IBuildContext context) [0x000ca] in C:\Users\Jesse\Unshared Code\Chromavaders\Library\PackageCache\com.unity.scriptablebuildpipeline@1.15.2\Editor\Shared\BuildTasksRunner.cs:56
UnityEditor.GenericMenu:CatchMenu (object,string[],int)
This occurs on Windows 10, Unity 2020.2.2f1. Also, I had to disable my use of the performance testing extension, as for some reason the symbols that it requires to exist aren’t defined when compiling asset bundles.
EDIT: Fixed as of Addressables 1.17.13 and Scriptable Build Pipeline 1.17.0.
Hey @JesseSTG_1 thanks for bringing this to our attention. I’ll create a ticket on our end to have the SBP team look at it but I’d also go ahead and file a bug on your end. If you’re able to provide your project I think that’d be very useful for them.
Unfortunately I don’t have any greater knowledge to share. I’m also not sure when the SBP team will look at this, though they are usually pretty fast.
Hey @JesseSTG_1 . So, that issue is actually part of Scriptable Build Pipeline. I believe a ticket was created but we’ll have to wait for a new SBP release to come out before that gets resolved. Once it does we’ll update Addressables to use the fixed version of SBP.
Just wanted to post that in Addressables 1.17.8 (coming out in a day or two) we’ll be pointing to a new version of SBP that should have a fix for your issue.
EDIT: So far so good! Addressables Analyze works on all built-in analyzers (plus one custom one) without a hitch. Gonna resolve the issues it found then I’ll try to produce a build.
EDIT II: I produced a build! I am now ready to close this chapter. Thank you!