diff --git a/spine-ts/core/src/Animation.ts b/spine-ts/core/src/Animation.ts index c259e97b8..36ad09823 100644 --- a/spine-ts/core/src/Animation.ts +++ b/spine-ts/core/src/Animation.ts @@ -829,7 +829,7 @@ module spine { } setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string) { - slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); } } diff --git a/spine-ts/core/src/AnimationState.ts b/spine-ts/core/src/AnimationState.ts index ed648fffb..d509b90a4 100644 --- a/spine-ts/core/src/AnimationState.ts +++ b/spine-ts/core/src/AnimationState.ts @@ -260,7 +260,7 @@ module spine { var slot = slots[i]; if (slot.attachmentState == setupState) { var attachmentName = slot.data.attachmentName; - slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); } } this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.