Home / Unity / U16

Unity error: ArgumentNullException: One of the elements in atlases is null. Please check your Inputs. — cause and fix

The atlases array passed to PackAtlases is non-empty, but one element is null: an unassign

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

Original message (verbatim)

ArgumentNullException: One of the elements in atlases is null. Please check your Inputs.

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

Trigger

The atlases array passed to PackAtlases is non-empty, but one element is null: an unassigned or freed atlas reference slipped into the array.

Typical cause

The loop null-checks each element; on a null entry it throws ArgumentNullException and asks to check the inputs.

Step-by-step fix

  1. Filter out null elements before passing the array.
  2. Check atlas fields are assigned in the Inspector with no None placeholder.
  3. Confirm referenced atlases are not destroyed or unloaded before packing.

Source links

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

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