Hello, I have a question about a library.
So there you go, I'm using the runtime for monogame C #. I already use the skins to have different characters and in my game to be able to give the choice between the male and female character.
(Like image)
Everything works fine with the skins.
Now I would like to put an item in the character's hands (Here in the picture a shovel), regardless of the female or male skin. I have a lot of things to put on, about thirty. How can I change the texture (for exmple, an ax or any other object) of the object in the character's hands with my two skins? I would love to do this directly in C # code too.
Hope you understood me.
Steph. Thank you
1. sayfa (Toplam 1 sayfa)
steph
Bu mesaja eklenen dosyaları görüntülemek için gerekli yetkilere sahip değilsiniz.
1 year ago
- steph
- Mesajlar: 7
Harald
You can either make your items skins as well (which makes sense for e.g. armor items or trousers that are composed of multiple attachments attached to multiple bones), using runtime code as described here:
spine-unity Runtime Documentation: Combining Skins
If you want to attach only a single image such as a weapon, you can directly set a
or via convenience methods like
If you are already creating a combined skin programmatically, you can also set the attachment at this combined skin via
spine-unity Runtime Documentation: Combining Skins
If you want to attach only a single image such as a weapon, you can directly set a
Slot's
attachment via slot = skeleton.FindSlot(); slot.Attachment = attachment;
(see Skeleton findSlot
and Slot attachment
), or via convenience methods like
skeleton.SetAttachment(slotName, attachmentName)
(see Skeleton setAttachment
).If you are already creating a combined skin programmatically, you can also set the attachment at this combined skin via
combinedSkin.SetAttachment()
(see Skin setAttachment
). 1 year ago
-
Harald - Mesajlar: 4465
Mario
I strongly recommend using skins for weapons as well. While it's possible to do it all in code, it's messy and may also bring issues with texture atlas packaging and hence performance.
1 year ago
-
Mario - Mesajlar: 3283
steph
Great ! I didn't know we could do this. Thank you very much !
---
---
I have to create additional skins for my tools but I can't find how to display my characters and my tools at the same time.
---
Ok thank for the tipMario yazdı:I strongly recommend using skins for weapons as well. While it's possible to do it all in code, it's messy and may also bring issues with texture atlas packaging and hence performance.
---
One last question, I can't find out how to display multiple skins in spine?Harald yazdı:You can either make your items skins as well (which makes sense for e.g. armor items or trousers that are composed of multiple attachments attached to multiple bones), using runtime code as described here:
spine-unity Runtime Documentation: Combining Skins
If you want to attach only a single image such as a weapon, you can directly set aSlot's
attachment viaslot = skeleton.FindSlot(); slot.Attachment = attachment;
(seeSkeleton findSlot
andSlot attachment
),
or via convenience methods likeskeleton.SetAttachment(slotName, attachmentName)
(seeSkeleton setAttachment
).
If you are already creating a combined skin programmatically, you can also set the attachment at this combined skin viacombinedSkin.SetAttachment()
(seeSkin setAttachment
).
I have to create additional skins for my tools but I can't find how to display my characters and my tools at the same time.
1 year ago
- steph
- Mesajlar: 7
Erika
You can do so by opening the skins view, then pinning every skin you'd wish to see at the same time:steph yazdı:One last question, I can't find out how to display multiple skins in spine?
I have to create additional skins for my tools but I can't find how to display my characters and my tools at the same time.
Skins view - Spine User Guide
1 year ago
-
Erika - Mesajlar: 3131
steph
Thanks !Erika yazdı:You can do so by opening the skins view, then pinning every skin you'd wish to see at the same time:steph yazdı:One last question, I can't find out how to display multiple skins in spine?
I have to create additional skins for my tools but I can't find how to display my characters and my tools at the same time.
Skins view - Spine User Guide
1 year ago
- steph
- Mesajlar: 7
Mark topic unread
• 1. sayfa (Toplam 1 sayfa)
Dön Runtimes
- Tüm zamanlar UTC