Răsfoiți Sursa

[unity] Assign default struct values.

This prevents compiler errors with certain settings. Reproed in Unity 2017.3 beta
based on https://github.com/dorisugita/spine-runtimes/commit/dddc1d3c67a497e51ee2ac8bb035dc96a8e15241
@dorisugita
John 8 ani în urmă
părinte
comite
bc6132b051

+ 2 - 2
spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs

@@ -457,7 +457,7 @@ namespace Spine.Unity {
 			var skeleton = instruction.skeleton;
 			var drawOrderItems = skeleton.drawOrder.Items;
 
-			Color32 color;
+			Color32 color = default(Color32);
 			float skeletonA = skeleton.a * 255, skeletonR = skeleton.r, skeletonG = skeleton.g, skeletonB = skeleton.b;
 			Vector2 meshBoundsMin = this.meshBoundsMin, meshBoundsMax = this.meshBoundsMax;
 
@@ -661,7 +661,7 @@ namespace Spine.Unity {
 			}
 
 			// Populate Verts
-			Color32 color;
+			Color32 color = default(Color32);
 
 			int vertexIndex = 0;
 			var tempVerts = this.tempVerts;