setAttachment method

void setAttachment(
  1. String slotName,
  2. String placeholder
)

A convenience method to set an attachment by finding the slot with findSlot(String), finding the attachment with getAttachment(int, String), then setting the slot's SlotPose::getAttachment().

placeholder May be empty.

Implementation

void setAttachment(String slotName, String placeholder) {
  SpineBindings.bindings.spine_skeleton_set_attachment(
      _ptr, slotName.toNativeUtf8().cast<Char>(), placeholder.toNativeUtf8().cast<Char>());
}