spine api not support to doing that ...
source code from com.esotericsoftware.spine.SkeletonBounds
public void update(Skeleton skeleton, boolean updateAabb) {
if (skeleton == null)
throw new IllegalArgumentException("skeleton cannot be null.");
Array<BoundingBoxAttachment> boundingBoxes = this.boundingBoxes;
Array<FloatArray> polygons = this.polygons;
Array<Slot> slots = skeleton.slots;
int slotCount = slots.size;
boundingBoxes.clear();
polygonPool.freeAll(polygons);
polygons.clear();
for (int i = 0; i < slotCount; i++) {
Slot slot = slots.get(i);
Attachment attachment = slot.attachment;
if (attachment instanceof BoundingBoxAttachment) {
BoundingBoxAttachment boundingBox = (BoundingBoxAttachment) attachment;
boundingBoxes.add(boundingBox);
FloatArray polygon = polygonPool.obtain();
polygons.add(polygon);
boundingBox.computeWorldVertices(slot, polygon.setSize(boundingBox.getWorldVerticesLength()));
}
}
if (updateAabb)
aabbCompute();
}
The new skeletonAttachment not been judged
this supposed to be
public void update(Skeleton skeleton, boolean updateAabb) {
if (skeleton == null)
throw new IllegalArgumentException("skeleton cannot be null.");
Array<BoundingBoxAttachment> boundingBoxes = this.boundingBoxes;
Array<FloatArray> polygons = this.polygons;
Array<Slot> slots = skeleton.slots;
int slotCount = slots.size;
boundingBoxes.clear();
polygonPool.freeAll(polygons);
polygons.clear();
for (int i = 0; i < slotCount; i++) {
Slot slot = slots.get(i);
Attachment attachment = slot.attachment;
if (attachment instanceof BoundingBoxAttachment) {
BoundingBoxAttachment boundingBox = (BoundingBoxAttachment) attachment;
boundingBoxes.add(boundingBox);
FloatArray polygon = polygonPool.obtain();
polygons.add(polygon);
boundingBox.computeWorldVertices(slot, polygon.setSize(boundingBox.getWorldVerticesLength()));
}[b] else if (attachment instanceof SkeletonAttachment) {
SkeletonAttachment skeletonAttachment = (SkeletonAttachment) attachment;
Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
// should be some code
}[/b]
}
if (updateAabb)
aabbCompute();
}