• RuntimesUnity
  • SkeletonGraphic with multiple atlases and GetRemappedClone

Hello, we are attempting to use SkeletonGraphic with our character that has 10 atlas textures, and turning on "multiple canvasrenderers" seemed to work initially. However, our attachments are set by using GetRemappedClone() on a duplicate skin, I think similar to the mix-and-match example. This works without issue on SkeletonAnimation, but on SkeletonGraphic I realized nothing was showing up aside from the base skin. So I was reading these forums and read about SkeletonGraphicCustomMaterials... basically just slapped this component on and then everything worked. Is that right? Do I need to do anything else or that just magically makes things work? I noticed about 21 canvas renderers per character now on the unity UI too haha.

Thanks.

    Related Discussions
    ...

    pixilestudios This works without issue on SkeletonAnimation, but on SkeletonGraphic I realized nothing was showing up aside from the base skin.

    @pixilestudios If only the base skin is showing, either you are missing a call to SetSlotsToSetupPose(), or didn't assign the combined skin, or something else is going wrong with your code. As the MixAndMatch Graphic component in the MixAndMatch example scene shows, there is no additional component necessary. So you should never need to use SkeletonGraphicCustomMaterials just for making mix and match work on SkeletonGraphic.

    Okay I did some testing again and you are right it seemed to work without the SkeletonGraphicCustomMaterials component. Maybe something else was going on that was making it not work, as I was on a different git branch at the time so might have messed something up. Thanks for the confirmation though!

    By the way, is it recommended to interact with SkeletonGraphic after Start() or doesn't matter? On UI that is initially inactive, the SkeletonGraphic will obviously not have Awaked/Started, until the UI that it is on is enabled.

      Glad to hear it's working as desired without the SkeletonGraphicCustomMaterials component now.

      pixilestudios By the way, is it recommended to interact with SkeletonGraphic after Start() or doesn't matter? On UI that is initially inactive, the SkeletonGraphic will obviously not have Awaked/Started, until the UI that it is on is enabled.

      What exactly do you mean by "interact with SkeletonGraphic", what do you have in mind? In general, basically any skeleton-based interaction that is supported by SkeletonAnimation is also supported by SkeletonGraphic.

        Harald As in, setting slots, playing animations, etc before the SkeletonGraphic has awaked or started.

        @pixilestudios Yes, you can of course modify the Skeleton or AnimationState at any later time. If you modify things before SkeletonAnimation's Start or even before Awake, you will trigger SkeletonAnimation initialization early.