• RuntimesUnity
  • How can I use global light on spine mecanim?


Hi! I'm trying to use global light so i can make day and night time in my game project.
I'm using URP, global light, and changed other background's materials and they all worked. except for spine..
i can't change my spine mecanim's material. so i changed spine's shader to URP sprite-lit-default, and light seems like working but there's wired outline appears on my object.

is there any way that I can use the global light on my spine object? or any way to remove that outline?

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

    To use global light with Spine Mecanim in a URP project, you should ensure that you are using the correct URP-compatible shaders provided by the Spine URP Shaders UPM package. The shader Universal Render Pipeline/2D/Spine/Skeleton Lit or Universal Render Pipeline/2D/Spine/Sprite should be used if you want your Spine skeleton to be affected by 2D lights, including global lights. If you are experiencing unwanted outlines, it might be due to using a shader not fully compatible with your setup or having multiple materials causing submesh outlines. Ensure that your skeleton uses a single material to avoid this issue, or use the RenderCombinedMesh component to manage outlines properly.

    For more information on using the correct shaders, you can refer to the Spine URP Shaders extension UPM package.

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

      Spinebot I'm sorry but can I ask 1 more question? I'm trying to find skeleton Lit but there is no Skeleton Lit in URP.. I have Spine/Skeleton Lit but I can't find it in URP.

      I installed the spine runtime very first, and after that I installed the URP. Can this be problem? I reinstalled and updated spine shader folder but it doesn't work. plz help me!

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

        RIM i can't change my spine mecanim's material

        See the FAQ under "I tried assigning materials at the MeshRenderer, but it is not possible. Why?" on how materials are handled:
        https://esotericsoftware.com/spine-unity-faq#Visual

        RIM so i changed spine's shader to URP sprite-lit-default, and light seems like working but there's wired outline appears on my object.

        What do you mean by "Spine's shader"? If you mean you've changed the shader at the generated Material next to your skeleton assets, then that's the right way to change the material for all instances.

        By "wired outline" I assume you mean a black outline. That's because you've exported as PMA and don't use a suitable shader, see the FAQ here:
        https://esotericsoftware.com/spine-unity-faq#Visual

        RIM I'm trying to find skeleton Lit but there is no Skeleton Lit in URP.. I have Spine/Skeleton Lit but I can't find it in URP.

        You are in the wrong folder in your screenshot.
        For a 3D URP setup you want to use Universal Render Pipeline/Spine/Skeleton Lit.
        for a 2D URP setup you want to use Universal Render Pipeline/2D/Spine/Skeleton Lit.
        See the documentation here for all URP shaders:
        https://esotericsoftware.com/spine-unity-rendering#URP-Shaders-Extension-Package
        If you can't find it in the menu under Universal Render Pipeline/Spine/Skeleton Lit your package installation likely has gone wrong.