Stores attachments by slot index and attachment name.

See SkeletonData {@link SkeletonData#defaultSkin}, Skeleton {@link Skeleton#skin}, and Runtime skins in the Spine Runtimes Guide.

Constructor

new(name:String)

Variables

@:value(new AttachmentSet())attachments:AttachmentSet = new AttachmentSet()

@:value(new Array(0))bones:Array<BoneData> = new Array(0)

@:value(new Array(0))constraints:Array<ConstraintData> = new Array(0)

Methods

setAttachment(slotIndex:Int, name:String, attachment:Attachment):Void

Adds an attachment to the skin for the specified slot index and name.

addSkin(skin:Skin):Void

Adds all attachments, bones, and constraints from the specified skin to this skin.

copySkin(skin:Skin):Void

Adds all bones and constraints and copies of all attachments from the specified skin to this skin. Mesh attachments are not copied, instead a new linked mesh is created. The attachment copies can be modified without affecting the originals.

getAttachment(slotIndex:Int, name:String):Attachment

Returns the attachment for the specified slot index and name, or null.

removeAttachment(slotIndex:Int, name:String):Void

Removes the attachment in the skin for the specified slot index and name, if any.

getAttachments():Array<SkinEntry>

Returns all attachments in this skin.

getAttachmentsInSkinForSlot(slotIndex:Int, attachments:Array<SkinEntry>):Void

Returns all attachments in this skin for the specified slot index.

clear():Void

Clears all attachments, bones, and constraints.

getName():String

The skin's name, which is unique across all skins in the skeleton.

attachAll(skeleton:Skeleton, oldSkin:Skin):Void

Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached.