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
Stranica: 1/1.
steph
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
7 months ago
- steph
- Postovi: 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
). 7 months ago
-
Harald - Postovi: 4101
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.
7 months ago
-
Mario - Postovi: 3086
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 je napisao/la: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 je napisao/la: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.
7 months ago
- steph
- Postovi: 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 je napisao/la: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
7 months ago
-
Erika - Postovi: 3085
steph
Thanks !Erika je napisao/la:You can do so by opening the skins view, then pinning every skin you'd wish to see at the same time:steph je napisao/la: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
7 months ago
- steph
- Postovi: 7
Mark topic unread
• Stranica: 1/1.
Natrag na Runtimes
- Vremenska zona: UTC