The issue you're experiencing with shadows not being received by Spine objects in the build, despite working in Play Mode, is likely related to the shaders not being included in the build. This is a common problem when using Addressables or when shaders are set through code.
Here are a few steps you can take to resolve this issue:
Always Included Shaders: Ensure that the shaders you are using are included in the "Always Included Shaders" list in the project settings. This can be found under Edit > Project Settings > Graphics > Always Included Shaders
. Add the Spine shaders you are using to this list.
Addressables Settings: Make sure that all the materials and shaders used by your Spine objects are correctly referenced in your Addressables settings. Sometimes, assets might not be included in the build if they are not properly referenced.
Shader Stripping: Check if shader stripping is enabled in your project settings. If it is, make sure that the necessary variants of your shaders are not being stripped out. This can be found under Edit > Project Settings > Graphics > Shader Stripping
.
URP Shaders: If you are using the Universal Render Pipeline (URP), ensure that you are using the correct Spine URP shaders. The standard Spine shaders might not work correctly with URP.
Manual Integration: If the issue persists, you might need to manually integrate the changes from the Spine runtime updates. For example, the issue with shadows not casting correctly was fixed in the 4.1 branch. You can manually integrate the changes from this commit into your project.
Testing with Non-Spine Shaders: As a troubleshooting step, you can test whether the same issue occurs with non-Spine shaders. This can help determine if the problem is specific to Spine shaders or a more general issue with your project setup.
If none of these steps resolve the issue, you might want to create a minimal Unity project that demonstrates the problem and send it to the support team for further investigation.