setAttachment method

void setAttachment(
  1. int slotIndex,
  2. String name,
  3. Attachment? attachment
)

Adds an attachment to the skin for the specified slot index and name. If the name already exists for the slot, the previous value is replaced.

Implementation

void setAttachment(int slotIndex, String name, Attachment? attachment) {
  SpineBindings.bindings.spine_skin_set_attachment(
      _ptr, slotIndex, name.toNativeUtf8().cast<Char>(), attachment?.nativePtr.cast() ?? Pointer.fromAddress(0));
}