I got this error when compiling a unity game. How to fix this ?
Thanks
Assets/spine-unity/Mesh Generation/Arrays/ArraysMeshGenerator.cs(221,21): error CS0165: Use of unassigned local variable `color'
And another Assets/spine-unity/Mesh Generation/Arrays/ArraysMeshGenerator.cs(157,19): error CS0165: Use of unassigned local variable `color'
Line 157
colors[vi] = color; colors[vi + 1] = color; colors[vi + 2] = color; colors[vi + 3] = color;
Line 221
colors[vi] = color; uvs[vi].x = attachmentUVs[iii]; uvs[vi].y = attachmentUVs[iii + 1];
Replace line 116
with
Source code (which has the problem):
https://github.com/EsotericSoftware/spine-runtimes/blob/3.4.02/spine-unity/Assets/spine-unity/Mesh%20Generation/Arrays/ArraysMeshGenerator.cs
This is assuming you are using an older version of spine-runtimes like v3.4 as your code and line numbers suggest.
If you upgrade to the latest Spine Unity runtime (for instance version 3.6.39), you will also have this problem, but in a different file (SpineMesh.cs):
https://github.com/EsotericSoftware/spine-runtimes/blob/3.6.39/spine-unity/Assets/spine-unity/Mesh%20Generation/SpineMesh.cs
In this case, apply the same fix to lines 460 and 664.