• Runtimes
  • Multi Side Character

I'm try to build a multi side character and using a skin per side.
I show/hide most of the images via a skin placeholder. That works very good.

For the mouth I have a slot with 6 images attached (I show and hide them via an animation) and I can not add all of them into a skin placeholder.

Than I found this nice skin bones and it helped a lot to clean up the editor.

Are skin bones only for the editor or should this also reflect (show/hide the mouth) in runtime?

I use the c-runtime and the mouth does not hide after skin change.

    Related Discussions
    ...

    pinguin I think using skin bones as a way to hide slots is not the function for which skin bones were intended, but as far as I have tried with skeleton data exported from the latest Spine on my end, it should work properly at runtime. Could you please tell us what version of the Spine editor and runtime you are using? Also, could you show us your code that implements the skin change?

    See here about changing the skin at runtime:
    http://esotericsoftware.com/spine-runtime-skins#Skin-changes
    Also:
    http://esotericsoftware.com/spine-api-reference#Skeleton-setSkin

    If that behavior isn't to your liking, you will need to manage which attachments are visible yourself. One way to do that is to call Skeleton setSlotsToSetupPose (or setToSetupPose). Otherwise you will need to set the attachment for each slot, since only you know which attachments you want visible.

    7 jours plus tard

    Hi, it was my error.
    At the end of the animation I call setToSetupPose and that shows the wrong images in my case.

    Why can a Skin Placeholder only have one image attachment?
    The mouth has 5 different shapes, and in code I show/hide them. It would help to be able to just call show/hide on all images (mouth-a for all skins) and the skin handles what image is allowed to been shown.

    Thanks,
    Kolja

    • Nate a répondu à ça.

      pinguin Why can a Skin Placeholder only have one image attachment?

      Because the skin placeholder represents a single attachment. Instead of showing a specific attachment, you show the skin placeholder and the actual attachment shown comes from the skin. When you show the mouth-a skin placeholder, it shows the attachment for the current skin. A skin placeholder effectively has one attachment (or no attachment) per skin.

      Thanks, that makes sense.
      I'm not sure why, but I thought a slot can only have one Skin Placeholder attached.

      You helped me a lot. I think that solved my problem and I can revert my hack.

      Thanks,
      Kolja