It depends on the runtime you are using, and if you've customized attachment loading or rendering. Also note at runtime the attachment images are not usually separate images. They are in a texture with many attachment images packed into it.
You can see spine-unity here:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-unity/Assets/Spine/Runtime/spine-unity/Asset%20Types/SpineAtlasAsset.cs#L275
An attachment has a rendererObject. The attachment rendererObject is usually an atlas page, but can be customized via an AttachmentLoader.
An atlas page also has a rendererObject. What it is depends on what game toolkit you are using and how rendering is done. For Unity that gets set to a material.
You would need to get the attachment for each slot, look at the rendererObject
, cast it to an atlas page, look at the page's rendererObject
, cast it to a Unity material, and then use the Unity API to get more information from there.
The attachment also has the UVs that describe the position within the atlas page texture that make up the region. Drawing using that isn't super easy. It may be doable for regions, but for meshes it's harder.
An alternative to all of this is to create a skeleton for each piece you want to show (or reuse a single skeleton), then hide all the attachments except for one. Use the bounds of the skeleton to draw the one attachment in the right place.