Dear support team,

I set up a character with multiple skins.

In Godot I initialize the character with skin “Frau03XS”.
Afterwards I want to dress her in Jeans, Pullover and Sneakers.

But I only manage to display either of the skins. I can't manage to activate several of them in Godot in the same way I do in spine.

Here is the code I’m using.

spine_sprite.get_skeleton().set_skin_by_name("Frau03XS")
spine_sprite.get_skeleton().set_skin_by_name("Kleidung/Jeans")

Can you tell me how I can add the Jeans on top of the underlying skin?

Related Discussions
...

To add multiple skins on top of each other in Godot using the spine-godot runtime, you need to create a custom skin that combines the desired skins. The set_skin_by_name method replaces the current skin with a new one, so you need to use a different approach to combine skins. Here's how you can do it:

  1. Create a new skin and add the base skin and additional skins to it:
var custom_skin = spine_sprite.new_skin("custom-skin")
var skeleton_data = spine_sprite.get_skeleton().get_data()

custom_skin.add_skin(skeleton_data.find_skin("Frau03XS"))
custom_skin.add_skin(skeleton_data.find_skin("Kleidung/Jeans"))
custom_skin.add_skin(skeleton_data.find_skin("Kleidung/Pullover"))
custom_skin.add_skin(skeleton_data.find_skin("Kleidung/Sneakers"))

spine_sprite.get_skeleton().set_skin(custom_skin)
spine_sprite.get_skeleton().set_slots_to_setup_pose()
  1. This code creates a new skin called "custom-skin" and adds the base skin "Frau03XS" along with the additional clothing skins "Jeans", "Pullover", and "Sneakers". Finally, it sets this custom skin on the skeleton.

By using this method, you can mix and match different skins to dress your character as desired.