• RuntimesUnity
  • Weird white/colored blocks with SkeletonGraphic


The left is using SkeletonGraphic and the right is using SkeletonAnimation. The export setting is without Premultiply Alpha and I've set the Images import setting as "Alpha Is Transparency" and the materials as "Straight Alpha Texture". I have to use a SkeletonGraphic because I need it to work in a Canvas that's in Screen Space Overlay mode.
I'm using Unity version 2022.3.5 and runtime version 4.1-2023-06-27

Related Discussions
...

The issue you're experiencing with weird white or colored blocks when using SkeletonGraphic could be related to the material settings or the way the textures are being handled. Since you are using SkeletonGraphic, ensure that the material assigned to it is compatible with SkeletonGraphic and that the shader is set correctly. You mentioned using "Straight Alpha Texture," which is appropriate for SkeletonGraphic. However, make sure that the texture import settings are correct and that the material is set up to handle straight alpha textures properly. Additionally, check if the Multiple CanvasRenderers option is enabled in the SkeletonGraphic component, as this can affect how multiple blend modes are rendered. If the problem persists, consider creating a minimal Unity project that reproduces the issue and reviewing the material and texture settings in detail.

  • 86maylin ответили на это сообщение.

    Spinebot I'm not particularly sure how to ensure material is compatible with SkeletonGraphic and shader, but I did check the Multiple CanvasRenderers setting in the SkeletonGraphic object.

    • Misaki ответили на это сообщение.

      86maylin The shaders that are compatible with SkeletonGraphic are Spine/SkeletonGraphic and Spine/SkeletonGraphic Tint Black. If you instantiate the skeleton as SkeletonGraphic initially, the appropriate material will be set automatically. However, if you first instantiate it as SkeletonAnimation and then place it on the canvas, the original shader may remain unchanged. Please check the selected shader on your material settings:

      For more information about the shaders provided by the spine-unity runtime, please see the following section of the documentation:
      https://esotericsoftware.com/spine-unity-rendering#Shaders

      • 86maylin ответили на это сообщение.

        Misaki
        My settings is like this and appears to be correct. The material that's linked matches your image as well. The SkeletonAnimation is another gameobject and I did instantiate this gameobject as SkeletonGraphic via dragging the SkeletonData into the scene and selecting "SkeletonGraphic(UI)".

        • Misaki ответили на это сообщение.

          86maylin I see. Thank you for showing me the SkeletonGraphic component settings. Unfortunately, that alone does not allow us to identify the cause of the problem. Could you please create a minimal Unity project that reproduces the problem and send it to us via email?: contact@esotericsoftware.com
          Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

          • 86maylin ответили на это сообщение.

            Misaki I've just sent the email with repro project.

            • Misaki ответили на это сообщение.
            • Misaki оценил это.

              86maylin Thank you for sending us your Unity project! I have identified the cause of the issue. My screenshot may have caused some confusion, but in your case, you are using straight alpha textures, so you need to check the Straight Alpha Texture box in the SkeletonGraphicDefault material settings:

              This should resolve the issue. Please verify that it works.

              • 86maylin ответили на это сообщение.

                Misaki That worked! Thank you so much. 🙂