• RuntimesUnity
  • Spine-Unity 3.8 and I need 'Spine-SkeletonGraphic-Additive' Shader

Unity Version : 2020.3.45f1
Spine Version : 3.8 (spine-unity-3.8-2021-11-10.unitypackage)

The file exported from Spine was used in Unity UGUI, but the image was not drawn on the screen.
When I unchecked the 'Pma Vertex Colors option', the image was drawn, but the colors were strange.
So, I copied and imported the 'Spine-SkeletonGraphic-Additive shader' from the latest version of Spine and used it.
As a result, there were no problems with both the image and the color.
Could usage like this be problematic in the future?

    Related Discussions
    ...

    @dylee As we neither know your exact skeleton setup in Spine, nor your GameObject's component setup in Unity (and whether you're placing the SkeletonGraphic object below a CanvasGroup object with Alpha lower than 1.0), it's hard to guess why the skeleton did not display before your changes. In general you should not need to disable PMA Vertex Colors with Spine shaders unless you're using CanvasGroup with an Alpha value lower than 1.0.

    I guess that you have all slots with visible attachments set to Additive, and then you need to disable Cull Transparent Mesh at the SkeletonGraphic's CanvasRenderer component (and when you have enabled Multiple Canvas Renderers, at each submesh child as well) with spine-unity 3.8. In later spine-unity runtime versions this is automatically done for you.

    Is it correct that 1.0 refers to the alpha value?

    I would like to ask again whether it is okay to import and use a higher version shader in a lower version?

      dylee Is it correct that 1.0 refers to the alpha value?

      I'm not sure what you mean by this sentence. 1.0 in my above posting was about the Alpha value property of the CanvasGroup component. When this alpha value is less than 1.0, some special rules apply, which is why I was asking.

      dylee I would like to ask again whether it is okay to import and use a higher version shader in a lower version?

      It's fine to use spine-unity shaders of higher versions like 4.1 or 4.2-beta with the spine-unity version 3.8, yes.

        5 days later

        Harald
        I am using it in Unity by just dragging and dropping (to the UI).

        I'm not sure about Spine's settings because it was exported by someone who worked on Spine. However, this problem usually occurs in objects that use Alpha. When this problem occurs, the solution I know is as follows.

        1. Uncheck Premultiplied Alpha, Check Bleed Export (In Spine)
        2. Uncheck Pma Vertex Colors (In SkeletonGraphic Component)
        3. Use SkeletonGraphicAdditive Shader
        4. Check StraightAlphaTexture (In Material)
        5. Check Alpha Is Transparency (In TextureSetting)

        My guess is that problems arise in Spine if you use an object whose parent is Alpha less than 1.

        Will we ever know the exact trigger of the problem?

          dylee However, this problem usually occurs in objects that use Alpha.

          Did you check whether disabling Cull Transparent Mesh fixes the issue, as I've described above?

          dylee The file exported from Spine was used in Unity UGUI, but the image was not drawn on the screen.

          Could you please share more details about this sentence: If the whole skeleton not displayed (so nothing of the skeleton rendered at all)? Or is only a single attachment not displayed? Please also share screenshots of the skeleton if possible. Also please describe the setup of the Skeleton, are all visible slots using blend mode Additive?

          dylee When this problem occurs, the solution I know is as follows.
          [..]

          You should not need such a workaround.

          dylee My guess is that problems arise in Spine if you use an object whose parent is Alpha less than 1.
          Will we ever know the exact trigger of the problem?

          We will need more information to be able to help, see the questions above.