Problem statement

After Spine have updated seems that slots now being removed in the Unity for optimization if slot have 0% opacity?
So problem is - I created a slot to which I will use clipping mask, after that I change slot opacity to 0% and in unity clipping mask started to clip the all slots that was above over this slot
and it totally fixed for me if I add additional slot with 100% opacity over slot of 0% opacity

Also issue with clipping mask, suddenly if I make 0% of opacity for slot with clipping mask - clipping mask will not work at all

Runtime information

Tell us your Spine Runtimes version.
4.2

    Related Discussions
    ...

    The issue you're experiencing with clipping masks in Unity when setting slot opacity to 0% is known and has been discussed in various contexts. Here are some key points and potential solutions:

    1. Slot Visibility and Clipping Masks:

      • Setting the opacity of a slot to 0% will render the attachment fully transparent but still included in the mesh. This can cause unexpected behavior with clipping masks.
      • To avoid this, instead of setting the slot's opacity to 0%, you should disable the attachment. This ensures that the slot's attachment is not included in the mesh at all.
    2. Clipping Mask Behavior:

      • If a slot with a clipping mask is set to 0% opacity, the clipping mask may not work as expected. This is because the slot is still part of the mesh but fully transparent.
      • Adding an additional slot with 100% opacity above the 0% opacity slot can sometimes resolve the issue, as you've discovered.
    3. Version and Shader Compatibility:

      • Ensure you are using the correct shaders compatible with SkeletonGraphic components, especially if you are using URP or LWRP. Refer to the Important Material Requirements for more details.
      • If you are using a proper shader but still encountering issues, check the Important Notes on runtime repacking to see if your case matches any of the listed points.
    4. Bug Fixes and Updates:

      • There have been several bug fixes related to clipping masks and slot visibility in recent updates. Ensure you are using the latest version of the Spine-Unity runtime. You can download the latest package from the Spine Unity Download page.
    5. Additional Resources:

    By following these guidelines, you should be able to resolve the issues with clipping masks and slot opacity in Unity.

    This issue was not fixed by updating of spine-unity runtimes version, it still here

    Oh I not read what bot was wrote, he actually speaking that I really need to create additional slot, okay 🙂

    sohawkus and it totally fixed for me if I add additional slot with 100% opacity over slot of 0% opacity

    What do you mean you added a slot "over slot of 0% opacity"? Do you mean you have created an additional slot next to it in the same hierarchy level, and "over" meaning "above it" in the tree view?

    sohawkus Also issue with clipping mask, suddenly if I make 0% of opacity for slot with clipping mask - clipping mask will not work at all

    Could you please explain why you want to set the opacity to 0% there but still want the clipping mask to be active? If we understand your use-case and it's a valid scenario, we're happy to fix any issues related to it of course.

    sohawkus Tell us your Spine Runtimes version.
    4.2

    Please note that 4.2 is not precise enough to be helpful, we need either the name of the spine-unity unitypackage (also listed in Assets/Spine/version.txt), or the package version displayed in the Unity Package Manager if installed as UPM.

    In your case we know already that you're using the latest package, just mentioning for future postings. 🙂