Home / Merged error reference / 85

Addressables SpriteAtlas dependency errors (ChainOperation failure / packable index out of range)

Covers IDs: U02, U05 · Engine: Unity

U02 · Unity

Exception: ChainOperation of Type: System.Collections.Generic.IList`1[UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource] failed because dependent operation failed / Unable to load asset of type UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource from location Assets/Art/Sprites/my_atlas.spriteatlas.
Verification
原文命中(抓取页面)
Frequency
论坛点赞=1

Trigger: A custom Addressables build script locates sprite dependencies on the SpriteAtlas asset; it occurs when Addressables.DownloadDependenciesAsync("my_sprite") downloads dependencies; appears under BuildScriptVirtualMode / BuildScriptPackedMode, while LoadAssetAsync<Sprite> itself works. The original is a two-line error.

Typical cause: DownloadDependenciesAsync assumes all dependencies are IAssetBundleResource and loads the .spriteatlas asset as a bundle resource; the chain operation fails entirely when a dependent operation fails.

Step-by-step fix:
  1. Locate dependencies only on the AssetBundle containing the atlas — do not depend on the SpriteAtlas asset directly.
  2. Load the atlas by key with the corresponding provider.
  3. In custom ContentCatalogDataEntry, do not declare the atlas asset as a bundle-typed dependency.

Per-entry sources and capture date are listed at /sources#U02.

U05 · Unity

IndexOutOfRangeException: Index was outside the bounds of the array. / UnityEngine.AddressableAssets.Utility.AssetReferenceUtilities.GetAtlasSpritesAndPackables (UnityEngine.U2D.SpriteAtlas& atlas) (at ./Library/PackageCache/com.unity.addressables/Runtime/Utility/AssetReferenceUtilities.cs:30)
Verification
原文命中(抓取页面)
Frequency
论坛点赞=0

Trigger: In Addressables 2.x, a SubObject is selected for the AssetReferenceAtlasedSprite field in the Inspector; the SpriteAtlas Objects for Packing contains folders rather than individual sprites, and the throw occurs when atlas.spriteCount and atlas.GetPackables() return mismatched lengths; reproducible on Unity 6000.0.27f1 + Addressables 2.2.2/2.3.1. Multi-line stack.

Typical cause: GetPackables() keeps folder objects without expanding them into sprites; the loop reads atlasPackables[i] by atlas.spriteCount, and the index exceeds the array returned by GetPackables, triggering IndexOutOfRangeException.

Step-by-step fix:
  1. Put sprites directly into the atlas Objects for Packing (expand folders before packing); do not use a folder as a packable.
  2. Upgrade the Addressables package.
  3. At runtime use SubObjectName to select the sub-object instead of the editor selector path.

Per-entry sources and capture date are listed at /sources#U05.

Related errors

Need an offline quick-reference checklist?

Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.

View Pro pack / order