[libgdx] Additional changes for per-skin atlases feature.

This commit is contained in:
Davide Tantillo 2025-10-15 09:01:24 +02:00
parent 139fd84d07
commit 20d5ee63ad
2 changed files with 3 additions and 6 deletions

View File

@ -477,7 +477,7 @@ public class SkeletonBinary extends SkeletonLoader {
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent); if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
linkedMesh.mesh.setTimelineAttachment(linkedMesh.inheritTimelines ? (VertexAttachment)parent : linkedMesh.mesh); linkedMesh.mesh.setTimelineAttachment(linkedMesh.inheritTimelines ? (VertexAttachment)parent : linkedMesh.mesh);
linkedMesh.mesh.setParentMesh((MeshAttachment)parent); linkedMesh.mesh.setParentMesh((MeshAttachment)parent);
if (linkedMesh.mesh.getSequence() == null) linkedMesh.mesh.updateRegion(); if (linkedMesh.mesh.getRegion() == null) linkedMesh.mesh.updateRegion();
} }
linkedMeshes.clear(); linkedMeshes.clear();

View File

@ -60,11 +60,8 @@ public class AtlasAttachmentLoader implements AttachmentLoader {
for (int i = 0, n = regions.length; i < n; i++) { for (int i = 0, n = regions.length; i < n; i++) {
String path = sequence.getPath(basePath, i); String path = sequence.getPath(basePath, i);
regions[i] = atlas.findRegion(path); regions[i] = atlas.findRegion(path);
if (regions[i] == null) { if (regions[i] == null && !allowMissingRegions)
if (!allowMissingRegions) throw new RuntimeException("Region not found in atlas: " + path + " (sequence: " + name + ")");
throw new RuntimeException("Region not found in atlas: " + path + " (sequence: " + name + ")");
continue;
}
} }
} }