jtiret1

Hello there,

I am considering using Template Attachments in order to customize my characters at runtime. These customizations would be integrated into the character's body (like scars, tatoos, …). Thus, I need these sprite to deform with the body.

I have gone through this article: http://esotericsoftware.com/spine-unity-mix-and-match#Option-2%3A-Use-template-attachments-in-Spine%2C-and-generate-Attachments-from-UnityEngine.Sprites-in-Unity

My guess is that Template Attachments' sprites will deform with the body (depending how the Template Attachment is set up), just like regular prepacked variants.

But as the article always refers to accessories (like armor, swords and so on) that don't deform, I would like to confirm if it's the case or not.

Do sprites (like scars) added to my character at runtime using template attachments will deform with the rest of the body?

Thanks in advance,
John
jtiret1
  • Mesajlar: 1

Harald

If you replace an Attachment by using GetRemappedClone, you are only replacing the referenced texture region with another. All deformations will be applied as before the replacement.

Please note that the workflow of the documentation page referenced above (which is also demonstrated in the Mix and Match Equip example scene) was before the new improved Skin API became available. If you haven't already, you might want to check out how the new Skin API can be used to implement character customization:
spine-unity Runtime Documentation: Setting Skins
Blog: Spine 3.8 released: Improved skin API
This is also demonstrated in the example scene Mix and Match Skins that comes with the spine-unity unitypackage.
Kullanıcı avatarı
Harald

Harri
  • Mesajlar: 3924


Dön Unity