T.Fly() :If you're only seeing beta versions for 2022.2, which is in tech stream, it's likely that your Unity Hub needs to be updated.
Thanks very much for the hint, that was indeed the case, I should have checked that earlier!
T.Fly() :If you're only seeing beta versions for 2022.2, which is in tech stream, it's likely that your Unity Hub needs to be updated.
Thanks very much for the hint, that was indeed the case, I should have checked that earlier!
Edit 1 I didn't realise I had to download 4.1 from Git, just checking again now
Edit 2 Sorry I have no idea how to import the updated 4.1 from Git. I found the correct branch and downloaded the directory to zip, and im trying to copy the contents of "spine-unity" (Assets etc) into the root directory of my empty project but I just get >300 errors
Please can you explain how to properly import this updated package or link a normal Unity package for it please, thank you
Edit 1 I didn't realise I had to download 4.1 from Git, just checking again now
You don't have to download anything via git if you don't want to. The download page contains direct links to packages.
Edit 2 Sorry I have no idea how to import the updated 4.1 from Git. I found the correct branch and downloaded the directory to zip, and im trying to copy the contents of "spine-unity" (Assets etc) into the root directory of my empty project but I just get >300 errors
The possible ways how to install spine-unity and the URP shaders package are documented in detail here:
http://esotericsoftware.com/spine-unity#Installation
http://esotericsoftware.com/spine-unity#Optional-Extension-UPM-Packages
You can also find a video showing installation of the Timeline UPM package here:
I'm still having problems with this unfortunately, the Skeleton Lit shader just won't compile with Forward+ Selected.
Unity: 2022.2.2f1
URP: 14.0.4
Btw, I noticed the download page doesn't actually seem to have an updated 4.1 or 4.2 runtime (updated 2023-01-11 for 4.1), its just the URP packages that seem updated, is that correct?
Repro:
1) Create new URP project in 2022.2.2f1
2) Install Spine 4.1 or 4.2 beta from Spine downloads page
3) Install matching URP shaders from downloads page, install via Package Manager
4) Open the "URP 3D Shaders scene" from Examples
5) Set the URP Asset in Project settings
6) Observe that the default Forward renderer seems to work fine
7) ENSURE you change the URP SO renderer to Forward+
8 ) Things might LOOK ok immediately, BUT! The Spine Skeleton Lit shader is actually not compiling properly. Select it from the URP shaders, Spine-SkeletonLit-URP and see the following error
Shader error in 'Universal Render Pipeline/Spine/Skeleton Lit': invalid subscript 'shadowedColor' at /Users/welky/Documents/_UnityProjects/Valor/Packages/com.esotericsoftware.spine.urp-shaders-4.1-2019.1/Shaders/Include/Spine-SkeletonLit-ForwardPass-URP.hlsl(173) (on d3d11)
Compiling Subshader: 0, Pass: ForwardLit, Vertex program with _ADDITIONAL_LIGHT_SHADOWS _FORWARD_PLUS _MAIN_LIGHT_SHADOWS _RECEIVE_SHADOWS_OFF
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA 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: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING 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 _DOUBLE_SIDED_LIGHTING _LIGHT_AFFECTS_ADDITIVE _MAIN_LIGHT_SHADOWS_CASCADE _MIXED_LIGHTING_SUBTRACTIVE _RECEIVE_SHADOWS _SHADOWS_SOFT _STRAIGHT_ALPHA_INPUT
For your convenience I have also uploaded a repro project just incase. You can download here:
https://www.dropbox.com/s/t95srgqr08xdy30/SpineRepro2022.zip?dl=0
Please can you confirm if its working in a fresh project for you or not working, as I'm really struggling to tell if I'm fundamentally doing something wrong.
Thank you for your time!
For your convenience I have also uploaded a repro project just incase. You can download here:
Unfortunately we could not reproduce your issue, your reproduction file does not contain your versions of the com.esotericsoftware.spine.urp-shaders
package, which seems to be installed locally in /Users/welky/Documents/_UnityProjects/Valor/Packages/
as you can also see in your above error message:
Shader error in 'Universal Render Pipeline/Spine/Skeleton Lit': invalid subscript 'shadowedColor' at /Users/welky/Documents/_UnityProjects/Valor/Packages/com.esotericsoftware.spine.urp-shaders-4.1-2019.1/Shaders/Include/Spine-SkeletonLit-ForwardPass-URP.hlsl(173) (on d3d11)
When we download the latest 4.1 version of the com.esotericsoftware.spine.urp-shaders
package from the download page, we receive no compile errors after changing settings to Forward+
.
Please also note that you should not include the Library
directory in reproduction project packages, since this only unnecessarily increases file size.
Apologies about the repro project, I have made a new one which includes the package correctly and no library folder
https://www.dropbox.com/s/3xcnjbvqpwvyr88/My%20project%20%286%29.zip?dl=0
Once opened, please navigate to Packages->com.esotericsoftware.spine.urp-shaders-4.1-2019.1->Shaders->Spine-SkeletonLit-URP to see if it has the shadowedColor error
After trying multiple times in fresh project I always get the problem:
Shader error in 'Universal Render Pipeline/Spine/Skeleton Lit': invalid subscript 'shadowedColor' at /Users/welky/Documents/_UnityProjects/Valor/Packages/com.esotericsoftware.spine.urp-shaders-4.1-2019.1/Shaders/Include/Spine-SkeletonLit-ForwardPass-URP.hlsl(173) (on d3d11)
Is there any reason shadowedColor may be missing for me in my environment? Are you using d3d11 like I am according to the error?
Thank you for your time
Thanks for the additional reproduction project, we could now reproduce the issue! It has just been fixed via this commit on the 4.1 branch (will be merged to 4.2-beta soon). A new UPM package containing this bugfix will be published soon. Thanks for reporting!
The bugfix has been merged to the 4.2-beta branch. New 4.1 and 4.2-beta Spine URP Shaders UPM packages are available for download here as usual:
http://esotericsoftware.com/spine-unity-download
Thanks so much Spine Team, seems to be working great now! Really, thanks so much for your efforts and patience with me on this issue. I'm now using Forward+ with Spine and that's amazing! Very happy to take advantage of Forward+ performance!
One minor issue i noticed, for 2D "Orthographic" cameras, spotlights do not work with Forward+ in Game View (works fine in Scene view aslong as 2D isn't selected). Pointlights are fine, but spotlights don't seem to work. It works fine in Perspective view, which is what I'm using for my project, so doesn't affect me - just thought you should know anyway - not sure if it's a Unity problem or not or just an incorrect setting somewhere
Anyway, thanks again!
Thanks for your kind words, glad the issues are resolved now! And thanks for reporting.
not sure if it's a Unity problem or not or just an incorrect setting somewhere
This seems to be a limitation with Unity's render pipeline, you should receive a warning log message when switching the camera to orthographic reading:
"Orthographic projection is not supported when using Forward+.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)"