When I try to build my game,

Unity Version:2021.3.16
unity-spine:3.8
URP:12.1.8

Hello! I used Spine to create characters in Unity, and it displayed the correct effect in the game, but in the built version, the images became unaffected by lighting. The shader used for the material is' Universal Render Pipeline/Spine/Skeleton Lit '

In Unity:

Built Version:

  • Harald がこの投稿に返信しました。
    Related Discussions
    ...

    Another Question. When I build another scene, an error occured:

    Shader error in 'Universal Render Pipeline/Spine/Sprite': invalid subscript 'shadowCoord' at /zzr/Game/HXZ_URP/Packages/com.esotericsoftware.spine.urp-shaders-3.8-2019.3/Shaders/Include/Spine-Sprite-ForwardPass-URP.hlsl(232) (on d3d11)

    Compiling Subshader: 0, Pass: ForwardLit, Fragment program with ETC1_EXTERNAL_ALPHA PIXELSNAP_ON REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR _ALPHAPREMULTIPLY_ON _EMISSION _FIXED_NORMALS_VIEWSPACE _MIXED_LIGHTING_SUBTRACTIVE _NORMALMAP
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: DIRLIGHTMAP_COMBINED FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON MAIN_LIGHT_CALCULATE_SHADOWS SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _ALPHABLEND_ON _ALPHA_CLIP _COLOR_ADJUST _DIFFUSE_RAMP _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_WORLDSPACE _FOG _FULLRANGE_HARD_RAMP _FULLRANGE_SOFT_RAMP _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MULTIPLYBLEND _MULTIPLYBLEND_X2 _OLD_HARD_RAMP _OLD_SOFT_RAMP _RECEIVE_SHADOWS_OFF _RIM_LIGHTING _SHADOWS_SOFT _SPECULAR _SPECULAR_GLOSSMAP _STRAIGHT_ALPHA_INPUT _TEXTURE_BLEND

      Stdzzr Shader error in 'Universal Render Pipeline/Spine/Sprite': invalid subscript 'shadowCoord' at /zzr/Game/HXZ_URP/Packages/com.esotericsoftware.spine.urp-shaders-3.8-2019.3/Shaders/Include/Spine-Sprite-ForwardPass-URP.hlsl(232) (on d3d11)

      This might be relevant ( unity3d-jp/UnityChanToonShaderVer2_Project44 ). I wonder if you disable shadow cascade affects the error.

      • Stdzzr がこの投稿に返信しました。

        SilverStraw This is indeed useful. Now build will not report any errors.

        However, the issue I mentioned earlier has not been resolved, that is, in the built version, the object is still not affected by the point light source, but it works well in the unity editor

        Well, I noticed that it was because my URP was set incorrectly, Orz

        Stdzzr unity-spine:3.8

        Please always list the full version number, which is the name of the unitypackage or zip package that you have downloaded. It's also listed in Assets/Spine/version.txt for the spine-unity runtime, and in com.esotericsoftware.spine.urp-shaders/version.txt in case of the Spine URP Shaders UPM package.

        If you are not using the latest version of the Spine URP shaders UPM package and the spine-unity runtime, please be sure to first try whether updating the packages resolves your issue:
        https://esotericsoftware.com/spine-unity-download#UPM-packages

        Also please note that version 3.8 is already very old, we have released many bugfixes since then. It's been 25 commits on the Spine URP shaders alone, as can be seen here. Could you please check whether this same issue also still occurs when you are using the latest version of the spine-unity 4.1 runtime and Spine URP Shaders UPM package?

        • Stdzzr がこの投稿に返信しました。

          Harald Full version number is: com.esotericsoftware.spine.urp-shaders-3.8-2019.3

          The problem has now been resolved, it is my URP setting issue. Thank you for your reply. Spine is the best community supported software I have ever seen

            Stdzzr Very glad to hear you've figured it out, and thanks for your kind words!