Home / Unity / U15

Unity error: ArgumentNullException: Value for parameter atlases is null — cause and fix

Calling SpriteAtlasUtility.PackAtlases(atlases, target) with a null atlases array.

ID
U15
Engine
Unity
Verification
源码原文(Editor/Mono/2D/SpriteAtlas/EditorSpriteAtlas.bindings.cs:28)
Frequency
未公开

Original message (verbatim)

ArgumentNullException: Value for parameter atlases is null

Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.

Trigger

Calling SpriteAtlasUtility.PackAtlases(atlases, target) with a null atlases array.

Typical cause

PackAtlases null-checks at entry; when atlases == null it throws ArgumentNullException("atlases", ...) and never enters the packing flow.

Step-by-step fix

  1. Pass an initialized SpriteAtlas array; do not pass null.
  2. Null-check the collected atlas list before calling the packing API.
  3. Confirm referenced atlas assets are loaded before packing.

Source links

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

Related errors

Related Unity 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

Back to the all-errors index Checkout and buy the Pro pack — $19.00