• RuntimesUnity
  • Sorting not correct in URP forwarded rendering Unity

Director While the Spine characters work well with the 3D environment, the Spine characters are not behaving as expected. Specifically, character A always appears in front of character B, no matter their relative positions.

I'm afraid we need more information to be able to help. What skeleton components are you using (SkeletonAnimation or perhaps SkeletonGraphic), what Material settings are you using at the problematic characters, etc. If possible, please also share screenshots of your undesired vs. expected result, so that we can understand your problem better.

In general, the spine-unity runtime uses standard MeshRenderer and CanvasRenderer components, perhaps something is wrong with your Material or camera sorting settings.

  • Director ответили на это сообщение.
    Related Discussions
    ...

    Harald Thank you for the reply. I use SkeletonAnimation.!!

    Harald Look at the image. the girl(upper) should show behind the other girl. It worked well in 2d renderer pipeline. But when I changed it to forward render pipeline, it happens

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

      Harald This is the material I'm using

      Director Look at the image. the girl(upper) should show behind the other girl. It worked well in 2d renderer pipeline. But when I changed it to forward render pipeline, it happens

      Thanks for the additional info. How is the object placed in the scene view in relation to the second one? Is it moved further away from the camera (in depth direction)?

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

        Harald Yes, it is further away from the camera

        @Director Could you then please send us a minimal Unity project that still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.

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

          Harald Thank you. I will

          Harald Hi, I've sent the minimal Unity project. Thank you

          @Director The problem is located in the ProjectSettings/GraphicsSettings.asset and is unrelated to Spine:

          ...
          m_TransparencySortMode: 3
          m_TransparencySortAxis: {x: 0, y: 1, z: 0}
          ..

          This seems to be a leftover setting of your initial 2D project, sorting by Y axis instead of by depth.
          If you change these two lines (using a text editor) to the following, it again sorts by the Z Axis (by depth) as desired:

          m_TransparencySortMode: 0
          m_TransparencySortAxis: {x: 0, y: 0, z: 1}

          This can be considered a bug in Unity, as the Transparency Sort Mode and Sort Axis settings are not displayed in the Project Settings window when using a URP renderer, but they still seem to be used. Please report this bug over at Unity, so that they can fix this issue in future updates.

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

            Harald Thank you so much. I changed the values in the GraphicsSettings.asset. It works😃

            Harald I have also reported this bug to Unity.

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

              Director Glad it helped, thanks for reporting it to Unity. 🙂

              год спустя

              Just want to say thank you Harald! This advice solved two days of headaches for me. And now I now for the future as well. Also reported to Unity. 🙂

              @nd_nomad Very glad to hear it helped, thanks for letting us know and for reporting it to Unity as well! 🙂