getAttachment method

Attachment? getAttachment(
  1. int slotIndex,
  2. String attachmentName
)

Implementation

Attachment? getAttachment(int slotIndex, String attachmentName) {
  if (skin != null) {
    final Attachment? attachment =
        skin!.getAttachment(slotIndex, attachmentName);
    if (attachment != null) return attachment;
  }
  if (data.defaultSkin != null) {
    return data.defaultSkin!.getAttachment(slotIndex, attachmentName);
  }
  return null;
}