Spine error: Region not found in atlas
- spine-ts (web, Phaser, PixiJS)
Region not found in atlas: head (region attachment: head)— AtlasAttachmentLoader.newRegionAttachment / newMeshAttachment- spine-csharp (Unity)
Region not found in atlas: head (region attachment: head)— AtlasAttachmentLoader.NewRegionAttachment / NewMeshAttachment
The skeleton names an image that the texture atlas does not list. The runtime builds every region and mesh attachment of every skin while loading, so one missing name stops the whole skeleton, even if that image is never shown.
What the runtime looks up
For each region or mesh attachment the loader takes its path, or the attachment name when there is no path, and asks the atlas for a region with exactly that name. The comparison is plain string equality: case, spaces and folder prefixes all count. The first word in the message is that path; the part in brackets is the attachment name in the skeleton.
For an attachment with a sequence, the looked-up name is the path plus the frame number, padded with zeros to the sequence's digits — flame01, flame02 — and the message says (sequence: …).
// skeleton.json — the attachment asks for "Head"
"head": { "head": { "path": "Head", "width": 120, "height": 140 } }
// skeleton.atlas — the page only has "head"
head
bounds: 2, 2, 120, 140Why it happens
- The atlas is older than the skeleton. A new image was added and the skeleton exported, but the atlas was not packed again, or the game still loads the previous
.atlasfile. - A name differs only in case or folder. The region is
parts/headin the atlas andheadin the skeleton, orHeadagainsthead. - The image lives in an atlas the game does not load. A skeleton can use regions from several atlas pages or files; if only one is passed to the loader, the rest are missing.
- A skin nobody uses still references a deleted image. All skins are built at load time, not only the active one.
How to fix it
- Open the
.atlasfile in a text editor and search for the name from the message. Region names sit on their own lines without a colon; the line ending in.pngabove them is the page image. - If it is there under a different case or folder, rename the image or set the attachment's
pathto the atlas name. - If it is not there, pack the atlas again from the images the skeleton uses and ship both files together.
- If the attachment is no longer needed, delete it from every skin.
Check your skeleton
The Spine JSON validator does not look for this one, but checks the rest of the file for the problems the runtime loads silently — slot colors, mesh data, deform keys, bone order. It runs in your browser.