enjack spine-unity runtime version is "This Spine-Unity runtime works with data exported from Spine Editor version: 4.1.xx Package version: spine-unity-4.1-2022-07-28.unitypackage"
Please note that your spine-unity package is already a year old and there have been 88 commits of bugfixes and improvements since then. We would highly recommend updating the spine-unity runtime first when encounting any issues. As always, be sure to backup your project first.
enjack 3.here is the material settings, the project requires "write to depth", and it is URP project.
In general it is not recommended to use non-URP Spine shaders with URP, even when it's unlit shaders. Similarly, there are known issues especially on mobile devices when incorrectly using a URP shader with SkeletonGraphic
, so I would not be surprised if using a non-URP shader with the URP pipeline yields problems as well.
In general there is the Universal Render Pipeline/Spine/Skeleton
shader available for unlit purposes, which has been added after your used spine-unity package version, so you will need to update the package first to use this shader.
I assume the only feature you require from the Spine/Sprite/Unlit
shader is the Write to Depth
feature, is this correct? If so, you could easily create a copy of the Universal Render Pipeline/Spine/Skeleton
shader, modify its name and replace occurances of ZWrite Off
with ZWrite On
(it occurs twice in the shader).
But enemies literally dissapear behind the sword animation.
This sounds as if perhaps the shader of the sword effect uses a different shader than Spine/Sprite/Unlit
. When the sword effect is visible, do you see just a single Material used at the selected GameObject in the Inspector? Or do you perhaps see a second Material used, like e.g. a Material with an additive shader?