Эх сурвалжийг харах

[csharp] Code cleanup: replaced var with explicit type names.

Harald Csaszar 2 жил өмнө
parent
commit
01b8c06800
100 өөрчлөгдсөн 1100 нэмэгдсэн , 1110 устгасан
  1. 8 8
      spine-csharp/src/Animation.cs
  2. 4 4
      spine-csharp/src/AnimationState.cs
  3. 6 6
      spine-csharp/src/Atlas.cs
  4. 1 1
      spine-csharp/src/ExposedList.cs
  5. 1 1
      spine-csharp/src/IkConstraint.cs
  6. 10 10
      spine-csharp/src/Json.cs
  7. 20 21
      spine-csharp/src/Skeleton.cs
  8. 19 19
      spine-csharp/src/SkeletonBinary.cs
  9. 6 6
      spine-csharp/src/SkeletonClipping.cs
  10. 6 6
      spine-csharp/src/SkeletonData.cs
  11. 80 80
      spine-csharp/src/SkeletonJson.cs
  12. 4 4
      spine-csharp/src/Skin.cs
  13. 4 4
      spine-csharp/src/TransformConstraint.cs
  14. 12 12
      spine-csharp/src/Triangulator.cs
  15. 1 1
      spine-csharp/tests/src/AnimationStateTests.cs
  16. 4 4
      spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/SpineAnimationTesterTool.cs
  17. 2 1
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineBlinkPlayer.cs
  18. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerModel.cs
  19. 6 6
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs
  20. 3 3
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyTargetController.cs
  21. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/TransitionDictionaryExample.cs
  22. 1 1
      spine-unity/Assets/Spine Examples/Scripts/HurtFlashEffect.cs
  23. 9 9
      spine-unity/Assets/Spine Examples/Scripts/Mecanim as Logic/SkeletonAnimationHandleExample.cs
  24. 30 30
      spine-unity/Assets/Spine Examples/Scripts/MecanimAnimationMatchModifier/AnimationMatchModifierAsset.cs
  25. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/EquipButtonExample.cs
  26. 5 5
      spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/EquipSystemExample.cs
  27. 2 2
      spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/EquipsVisualsComponentExample.cs
  28. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/MixAndMatchSkinsButtonExample.cs
  29. 7 7
      spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/MixAndMatchSkinsExample.cs
  30. 5 5
      spine-unity/Assets/Spine Examples/Scripts/MixAndMatch.cs
  31. 5 5
      spine-unity/Assets/Spine Examples/Scripts/MixAndMatchGraphic.cs
  32. 1 1
      spine-unity/Assets/Spine Examples/Scripts/RaggedySpineboy.cs
  33. 5 5
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/CombinedSkin.cs
  34. 4 4
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/Ghost/SkeletonGhost.cs
  35. 3 3
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/Legacy/AtlasRegionAttacher.cs
  36. 10 10
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/Legacy/SpriteAttacher.cs
  37. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/OutlineSkeletonGraphic.cs
  38. 5 5
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/RenderExistingMesh.cs
  39. 3 3
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/Sample VertexEffects/JitterEffectExample.cs
  40. 2 2
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/Sample VertexEffects/TwoByTwoTransformEffectExample.cs
  41. 3 3
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SetRigidbodySolverIterations.cs
  42. 6 6
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonColorInitialize.cs
  43. 2 2
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonGraphicPlayAnimationAtEvent.cs
  44. 5 5
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonGraphicRenderTexture.cs
  45. 33 33
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonRagdoll.cs
  46. 33 33
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonRagdoll2D.cs
  47. 9 9
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonUtilityKinematicShadow.cs
  48. 7 7
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SpineEventUnityHandler.cs
  49. 2 2
      spine-unity/Assets/Spine Examples/Scripts/SpawnFromSkeletonDataExample.cs
  50. 1 1
      spine-unity/Assets/Spine Examples/Scripts/SpawnSkeletonGraphicExample.cs
  51. 1 1
      spine-unity/Assets/Spine Examples/Scripts/SpineGauge.cs
  52. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Spineboy.cs
  53. 2 2
      spine-unity/Assets/Spine Examples/Scripts/SpineboyBodyTilt.cs
  54. 2 2
      spine-unity/Assets/Spine Examples/Scripts/SpineboyFacialExpression.cs
  55. 4 4
      spine-unity/Assets/Spine Examples/Scripts/SpineboyFootplanter.cs
  56. 2 2
      spine-unity/Assets/Spine Examples/Scripts/SpineboyFreeze.cs
  57. 3 3
      spine-unity/Assets/Spine Examples/Scripts/SpineboyPole.cs
  58. 3 3
      spine-unity/Assets/Spine Examples/Scripts/SpineboyPoleGraphic.cs
  59. 1 1
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/AnimationReferenceAssetEditor.cs
  60. 34 34
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs
  61. 13 13
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SpineAtlasAssetInspector.cs
  62. 2 2
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SpineSpriteAtlasAssetInspector.cs
  63. 16 16
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerGraphicInspector.cs
  64. 17 17
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerInspector.cs
  65. 18 18
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerGraphicInspector.cs
  66. 21 21
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerInspector.cs
  67. 18 18
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/PointFollowerInspector.cs
  68. 5 5
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs
  69. 4 4
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicCustomMaterialsInspector.cs
  70. 36 35
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicInspector.cs
  71. 10 10
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonMecanimInspector.cs
  72. 2 2
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonMecanimRootMotionInspector.cs
  73. 4 4
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererCustomMaterialsInspector.cs
  74. 39 38
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs
  75. 2 2
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRootMotionBaseInspector.cs
  76. 38 38
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityBoneInspector.cs
  77. 3 3
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityInspector.cs
  78. 3 3
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineShaderWithOutlineGUI.cs
  79. 2 2
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs
  80. 39 39
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineAttributeDrawers.cs
  81. 46 46
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs
  82. 20 20
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/BlendModeMaterialsUtility.cs
  83. 17 17
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/DataReloadHandler.cs
  84. 11 11
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Instantiation.cs
  85. 13 13
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Preferences.cs
  86. 5 5
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineBuildProcessor.cs
  87. 15 15
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs
  88. 24 24
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs
  89. 9 9
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs
  90. 35 45
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineMaskUtilities.cs
  91. 65 64
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs
  92. 5 5
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBakingWindow.cs
  93. 23 26
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs
  94. 6 6
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs
  95. 4 4
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpriteAtlasImportWindow.cs
  96. 4 4
      spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonPartsRendererInspector.cs
  97. 22 22
      spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonRenderSeparatorInspector.cs
  98. 18 18
      spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/BlendModeMaterials.cs
  99. 8 8
      spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataAsset.cs
  100. 5 5
      spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataCompatibility.cs

+ 8 - 8
spine-csharp/src/Animation.cs

@@ -66,7 +66,7 @@ namespace Spine {
 			string[] propertyIds = new string[idCount];
 			string[] propertyIds = new string[idCount];
 			int currentId = 0;
 			int currentId = 0;
 			for (int t = 0; t < timelinesCount; ++t) {
 			for (int t = 0; t < timelinesCount; ++t) {
-				var ids = timelinesItems[t].PropertyIds;
+				string[] ids = timelinesItems[t].PropertyIds;
 				for (int i = 0, idsLength = ids.Length; i < idsLength; ++i)
 				for (int i = 0, idsLength = ids.Length; i < idsLength; ++i)
 					propertyIds[currentId++] = ids[i];
 					propertyIds[currentId++] = ids[i];
 			}
 			}
@@ -115,7 +115,7 @@ namespace Spine {
 				if (lastTime > 0) lastTime %= duration;
 				if (lastTime > 0) lastTime %= duration;
 			}
 			}
 
 
-			var timelines = this.timelines.Items;
+			Timeline[] timelines = this.timelines.Items;
 			for (int i = 0, n = this.timelines.Count; i < n; i++)
 			for (int i = 0, n = this.timelines.Count; i < n; i++)
 				timelines[i].Apply(skeleton, lastTime, time, events, alpha, blend, direction);
 				timelines[i].Apply(skeleton, lastTime, time, events, alpha, blend, direction);
 		}
 		}
@@ -1173,7 +1173,7 @@ namespace Spine {
 
 
 			float[] frames = this.frames;
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
 			if (time < frames[0]) { // Time is before first frame.
-				var setup = slot.data;
+				SlotData setup = slot.data;
 				switch (blend) {
 				switch (blend) {
 				case MixBlend.Setup:
 				case MixBlend.Setup:
 					slot.r = setup.r;
 					slot.r = setup.r;
@@ -1289,7 +1289,7 @@ namespace Spine {
 
 
 			float[] frames = this.frames;
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
 			if (time < frames[0]) { // Time is before first frame.
-				var setup = slot.data;
+				SlotData setup = slot.data;
 				switch (blend) {
 				switch (blend) {
 				case MixBlend.Setup:
 				case MixBlend.Setup:
 					slot.r = setup.r;
 					slot.r = setup.r;
@@ -1338,7 +1338,7 @@ namespace Spine {
 			} else {
 			} else {
 				float br, bg, bb;
 				float br, bg, bb;
 				if (blend == MixBlend.Setup) {
 				if (blend == MixBlend.Setup) {
-					var setup = slot.data;
+					SlotData setup = slot.data;
 					br = setup.r;
 					br = setup.r;
 					bg = setup.g;
 					bg = setup.g;
 					bb = setup.b;
 					bb = setup.b;
@@ -1377,7 +1377,7 @@ namespace Spine {
 
 
 			float[] frames = this.frames;
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
 			if (time < frames[0]) { // Time is before first frame.
-				var setup = slot.data;
+				SlotData setup = slot.data;
 				switch (blend) {
 				switch (blend) {
 				case MixBlend.Setup:
 				case MixBlend.Setup:
 					slot.a = setup.a;
 					slot.a = setup.a;
@@ -1869,10 +1869,10 @@ namespace Spine {
 
 
 			Slot slot = skeleton.slots.Items[slotIndex];
 			Slot slot = skeleton.slots.Items[slotIndex];
 			if (!slot.bone.active) return;
 			if (!slot.bone.active) return;
-			var vertexAttachment = slot.attachment as VertexAttachment;
+			VertexAttachment vertexAttachment = slot.attachment as VertexAttachment;
 			if (vertexAttachment == null || vertexAttachment.TimelineAttachment != attachment) return;
 			if (vertexAttachment == null || vertexAttachment.TimelineAttachment != attachment) return;
 
 
-			var deformArray = slot.deform;
+			ExposedList<float> deformArray = slot.deform;
 			if (deformArray.Count == 0) blend = MixBlend.Setup;
 			if (deformArray.Count == 0) blend = MixBlend.Setup;
 
 
 			float[][] vertices = this.vertices;
 			float[][] vertices = this.vertices;

+ 4 - 4
spine-csharp/src/AnimationState.cs

@@ -276,7 +276,7 @@ namespace Spine {
 					for (int ii = 0; ii < timelineCount; ii++) {
 					for (int ii = 0; ii < timelineCount; ii++) {
 						Timeline timeline = timelines[ii];
 						Timeline timeline = timelines[ii];
 						MixBlend timelineBlend = timelineMode[ii] == AnimationState.Subsequent ? blend : MixBlend.Setup;
 						MixBlend timelineBlend = timelineMode[ii] == AnimationState.Subsequent ? blend : MixBlend.Setup;
-						var rotateTimeline = timeline as RotateTimeline;
+						RotateTimeline rotateTimeline = timeline as RotateTimeline;
 						if (!shortestRotation && rotateTimeline != null)
 						if (!shortestRotation && rotateTimeline != null)
 							ApplyRotateTimeline(rotateTimeline, skeleton, applyTime, mix, timelineBlend, timelinesRotation,
 							ApplyRotateTimeline(rotateTimeline, skeleton, applyTime, mix, timelineBlend, timelinesRotation,
 												ii << 1, firstFrame);
 												ii << 1, firstFrame);
@@ -420,7 +420,7 @@ namespace Spine {
 						break;
 						break;
 					}
 					}
 					from.totalAlpha += alpha;
 					from.totalAlpha += alpha;
-					var rotateTimeline = timeline as RotateTimeline;
+					RotateTimeline rotateTimeline = timeline as RotateTimeline;
 					if (!shortestRotation && rotateTimeline != null) {
 					if (!shortestRotation && rotateTimeline != null) {
 						ApplyRotateTimeline(rotateTimeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1,
 						ApplyRotateTimeline(rotateTimeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1,
 							firstFrame);
 							firstFrame);
@@ -953,7 +953,7 @@ namespace Spine {
 		public ExposedList<TrackEntry> Tracks { get { return tracks; } }
 		public ExposedList<TrackEntry> Tracks { get { return tracks; } }
 
 
 		override public string ToString () {
 		override public string ToString () {
-			var buffer = new System.Text.StringBuilder();
+			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
 			TrackEntry[] tracksItems = tracks.Items;
 			TrackEntry[] tracksItems = tracks.Items;
 			for (int i = 0, n = tracks.Count; i < n; i++) {
 			for (int i = 0, n = tracks.Count; i < n; i++) {
 				TrackEntry entry = tracksItems[i];
 				TrackEntry entry = tracksItems[i];
@@ -1435,7 +1435,7 @@ namespace Spine {
 		}
 		}
 
 
 		protected void Reset (T obj) {
 		protected void Reset (T obj) {
-			var poolable = obj as IPoolable;
+			IPoolable poolable = obj as IPoolable;
 			if (poolable != null) poolable.Reset();
 			if (poolable != null) poolable.Reset();
 		}
 		}
 
 

+ 6 - 6
spine-csharp/src/Atlas.cs

@@ -63,10 +63,10 @@ namespace Spine {
 
 
 #if !(IS_UNITY)
 #if !(IS_UNITY)
 #if WINDOWS_STOREAPP
 #if WINDOWS_STOREAPP
-		private async Task ReadFile(string path, TextureLoader textureLoader) {
+		private async Task ReadFile (string path, TextureLoader textureLoader) {
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
 			var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
 			var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
-			using (var reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
+			using (StreamReader reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
 				try {
 				try {
 					Atlas atlas = new Atlas(reader, Path.GetDirectoryName(path), textureLoader);
 					Atlas atlas = new Atlas(reader, Path.GetDirectoryName(path), textureLoader);
 					this.pages = atlas.pages;
 					this.pages = atlas.pages;
@@ -78,7 +78,7 @@ namespace Spine {
 			}
 			}
 		}
 		}
 
 
-		public Atlas(string path, TextureLoader textureLoader) {
+		public Atlas (string path, TextureLoader textureLoader) {
 			this.ReadFile(path, textureLoader).Wait();
 			this.ReadFile(path, textureLoader).Wait();
 		}
 		}
 #else
 #else
@@ -120,7 +120,7 @@ namespace Spine {
 			AtlasPage page = null;
 			AtlasPage page = null;
 			AtlasRegion region = null;
 			AtlasRegion region = null;
 
 
-			var pageFields = new Dictionary<string, Action>(5);
+			Dictionary<string, Action> pageFields = new Dictionary<string, Action>(5);
 			pageFields.Add("size", () => {
 			pageFields.Add("size", () => {
 				page.width = int.Parse(entry[1], CultureInfo.InvariantCulture);
 				page.width = int.Parse(entry[1], CultureInfo.InvariantCulture);
 				page.height = int.Parse(entry[2], CultureInfo.InvariantCulture);
 				page.height = int.Parse(entry[2], CultureInfo.InvariantCulture);
@@ -140,7 +140,7 @@ namespace Spine {
 				page.pma = entry[1] == "true";
 				page.pma = entry[1] == "true";
 			});
 			});
 
 
-			var regionFields = new Dictionary<string, Action>(8);
+			Dictionary<string, Action> regionFields = new Dictionary<string, Action>(8);
 			regionFields.Add("xy", () => { // Deprecated, use bounds.
 			regionFields.Add("xy", () => { // Deprecated, use bounds.
 				region.x = int.Parse(entry[1], CultureInfo.InvariantCulture);
 				region.x = int.Parse(entry[1], CultureInfo.InvariantCulture);
 				region.y = int.Parse(entry[2], CultureInfo.InvariantCulture);
 				region.y = int.Parse(entry[2], CultureInfo.InvariantCulture);
@@ -246,7 +246,7 @@ namespace Spine {
 						region.u2 = (region.x + region.height) / (float)page.width;
 						region.u2 = (region.x + region.height) / (float)page.width;
 						region.v2 = (region.y + region.width) / (float)page.height;
 						region.v2 = (region.y + region.width) / (float)page.height;
 
 
-						var tempSwap = region.packedWidth;
+						int tempSwap = region.packedWidth;
 						region.packedWidth = region.packedHeight;
 						region.packedWidth = region.packedHeight;
 						region.packedHeight = tempSwap;
 						region.packedHeight = tempSwap;
 					} else {
 					} else {

+ 1 - 1
spine-csharp/src/ExposedList.cs

@@ -90,7 +90,7 @@ namespace Spine {
 
 
 		public ExposedList<T> Resize (int newSize) {
 		public ExposedList<T> Resize (int newSize) {
 			int itemsLength = Items.Length;
 			int itemsLength = Items.Length;
-			var oldItems = Items;
+			T[] oldItems = Items;
 			if (newSize > itemsLength) {
 			if (newSize > itemsLength) {
 				Array.Resize(ref Items, newSize);
 				Array.Resize(ref Items, newSize);
 			} else if (newSize < itemsLength) {
 			} else if (newSize < itemsLength) {

+ 1 - 1
spine-csharp/src/IkConstraint.cs

@@ -82,7 +82,7 @@ namespace Spine {
 		public void Update () {
 		public void Update () {
 			if (mix == 0) return;
 			if (mix == 0) return;
 			Bone target = this.target;
 			Bone target = this.target;
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			switch (this.bones.Count) {
 			switch (this.bones.Count) {
 			case 1:
 			case 1:
 				Apply(bones[0], target.worldX, target.worldY, compress, stretch, data.uniform, mix);
 				Apply(bones[0], target.worldX, target.worldY, compress, stretch, data.uniform, mix);

+ 10 - 10
spine-csharp/src/Json.cs

@@ -37,7 +37,7 @@ using System.Text;
 namespace Spine {
 namespace Spine {
 	public static class Json {
 	public static class Json {
 		public static object Deserialize (TextReader text) {
 		public static object Deserialize (TextReader text) {
-			var parser = new SharpJson.JsonDecoder();
+			SharpJson.JsonDecoder parser = new SharpJson.JsonDecoder();
 			parser.parseNumbersAsFloat = true;
 			parser.parseNumbersAsFloat = true;
 			return parser.Decode(text.ReadToEnd());
 			return parser.Decode(text.ReadToEnd());
 		}
 		}
@@ -175,7 +175,7 @@ namespace SharpJson {
 					case 'u':
 					case 'u':
 						int remainingLength = json.Length - index;
 						int remainingLength = json.Length - index;
 						if (remainingLength >= 4) {
 						if (remainingLength >= 4) {
-							var hex = new string(json, index, 4);
+							string hex = new string(json, index, 4);
 
 
 							// XXX: handle UTF
 							// XXX: handle UTF
 							stringBuffer[idx++] = (char)Convert.ToInt32(hex, 16);
 							stringBuffer[idx++] = (char)Convert.ToInt32(hex, 16);
@@ -217,7 +217,7 @@ namespace SharpJson {
 			int lastIndex = GetLastIndexOfNumber(index);
 			int lastIndex = GetLastIndexOfNumber(index);
 			int charLength = (lastIndex - index) + 1;
 			int charLength = (lastIndex - index) + 1;
 
 
-			var result = new string(json, index, charLength);
+			string result = new string(json, index, charLength);
 
 
 			index = lastIndex + 1;
 			index = lastIndex + 1;
 
 
@@ -226,7 +226,7 @@ namespace SharpJson {
 
 
 		public float ParseFloatNumber () {
 		public float ParseFloatNumber () {
 			float number;
 			float number;
-			var str = GetNumberString();
+			string str = GetNumberString();
 
 
 			if (!float.TryParse(str, NumberStyles.Float, CultureInfo.InvariantCulture, out number))
 			if (!float.TryParse(str, NumberStyles.Float, CultureInfo.InvariantCulture, out number))
 				return 0;
 				return 0;
@@ -236,7 +236,7 @@ namespace SharpJson {
 
 
 		public double ParseDoubleNumber () {
 		public double ParseDoubleNumber () {
 			double number;
 			double number;
-			var str = GetNumberString();
+			string str = GetNumberString();
 
 
 			if (!double.TryParse(str, NumberStyles.Any, CultureInfo.InvariantCulture, out number))
 			if (!double.TryParse(str, NumberStyles.Any, CultureInfo.InvariantCulture, out number))
 				return 0;
 				return 0;
@@ -387,18 +387,18 @@ namespace SharpJson {
 		}
 		}
 
 
 		public static object DecodeText (string text) {
 		public static object DecodeText (string text) {
-			var builder = new JsonDecoder();
+			JsonDecoder builder = new JsonDecoder();
 			return builder.Decode(text);
 			return builder.Decode(text);
 		}
 		}
 
 
 		IDictionary<string, object> ParseObject () {
 		IDictionary<string, object> ParseObject () {
-			var table = new Dictionary<string, object>();
+			Dictionary<string, object> table = new Dictionary<string, object>();
 
 
 			// {
 			// {
 			lexer.NextToken();
 			lexer.NextToken();
 
 
 			while (true) {
 			while (true) {
-				var token = lexer.LookAhead();
+				Lexer.Token token = lexer.LookAhead();
 
 
 				switch (token) {
 				switch (token) {
 				case Lexer.Token.None:
 				case Lexer.Token.None:
@@ -440,13 +440,13 @@ namespace SharpJson {
 		}
 		}
 
 
 		IList<object> ParseArray () {
 		IList<object> ParseArray () {
-			var array = new List<object>();
+			List<object> array = new List<object>();
 
 
 			// [
 			// [
 			lexer.NextToken();
 			lexer.NextToken();
 
 
 			while (true) {
 			while (true) {
-				var token = lexer.LookAhead();
+				Lexer.Token token = lexer.LookAhead();
 
 
 				switch (token) {
 				switch (token) {
 				case Lexer.Token.None:
 				case Lexer.Token.None:

+ 20 - 21
spine-csharp/src/Skeleton.cs

@@ -177,7 +177,7 @@ namespace Spine {
 		/// <summary>Caches information about bones and constraints. Must be called if the <see cref="Skin"/> is modified or if bones, constraints, or
 		/// <summary>Caches information about bones and constraints. Must be called if the <see cref="Skin"/> is modified or if bones, constraints, or
 		/// constraints, or weighted path attachments are added or removed.</summary>
 		/// constraints, or weighted path attachments are added or removed.</summary>
 		public void UpdateCache () {
 		public void UpdateCache () {
-			var updateCache = this.updateCache;
+			ExposedList<IUpdatable> updateCache = this.updateCache;
 			updateCache.Clear();
 			updateCache.Clear();
 
 
 			int boneCount = this.bones.Count;
 			int boneCount = this.bones.Count;
@@ -190,7 +190,7 @@ namespace Spine {
 			if (skin != null) {
 			if (skin != null) {
 				BoneData[] skinBones = skin.bones.Items;
 				BoneData[] skinBones = skin.bones.Items;
 				for (int i = 0, n = skin.bones.Count; i < n; i++) {
 				for (int i = 0, n = skin.bones.Count; i < n; i++) {
-					var bone = bones[skinBones[i].index];
+					Bone bone = bones[skinBones[i].index];
 					do {
 					do {
 						bone.sorted = false;
 						bone.sorted = false;
 						bone.active = true;
 						bone.active = true;
@@ -241,7 +241,7 @@ namespace Spine {
 			Bone target = constraint.target;
 			Bone target = constraint.target;
 			SortBone(target);
 			SortBone(target);
 
 
-			var constrained = constraint.bones;
+			ExposedList<Bone> constrained = constraint.bones;
 			Bone parent = constrained.Items[0];
 			Bone parent = constrained.Items[0];
 			SortBone(parent);
 			SortBone(parent);
 
 
@@ -266,7 +266,7 @@ namespace Spine {
 
 
 			SortBone(constraint.target);
 			SortBone(constraint.target);
 
 
-			var constrained = constraint.bones.Items;
+			Bone[] constrained = constraint.bones.Items;
 			int boneCount = constraint.bones.Count;
 			int boneCount = constraint.bones.Count;
 			if (constraint.data.local) {
 			if (constraint.data.local) {
 				for (int i = 0; i < boneCount; i++) {
 				for (int i = 0; i < boneCount; i++) {
@@ -302,7 +302,7 @@ namespace Spine {
 			Attachment attachment = slot.attachment;
 			Attachment attachment = slot.attachment;
 			if (attachment is PathAttachment) SortPathConstraintAttachment(attachment, slotBone);
 			if (attachment is PathAttachment) SortPathConstraintAttachment(attachment, slotBone);
 
 
-			var constrained = constraint.bones.Items;
+			Bone[] constrained = constraint.bones.Items;
 			int boneCount = constraint.bones.Count;
 			int boneCount = constraint.bones.Count;
 			for (int i = 0; i < boneCount; i++)
 			for (int i = 0; i < boneCount; i++)
 				SortBone(constrained[i]);
 				SortBone(constrained[i]);
@@ -316,7 +316,7 @@ namespace Spine {
 		}
 		}
 
 
 		private void SortPathConstraintAttachment (Skin skin, int slotIndex, Bone slotBone) {
 		private void SortPathConstraintAttachment (Skin skin, int slotIndex, Bone slotBone) {
-			foreach (var entry in skin.Attachments)
+			foreach (Skin.SkinEntry entry in skin.Attachments)
 				if (entry.SlotIndex == slotIndex) SortPathConstraintAttachment(entry.Attachment, slotBone);
 				if (entry.SlotIndex == slotIndex) SortPathConstraintAttachment(entry.Attachment, slotBone);
 		}
 		}
 
 
@@ -326,7 +326,7 @@ namespace Spine {
 			if (pathBones == null)
 			if (pathBones == null)
 				SortBone(slotBone);
 				SortBone(slotBone);
 			else {
 			else {
-				var bones = this.bones.Items;
+				Bone[] bones = this.bones.Items;
 				for (int i = 0, n = pathBones.Length; i < n;) {
 				for (int i = 0, n = pathBones.Length; i < n;) {
 					int nn = pathBones[i++];
 					int nn = pathBones[i++];
 					nn += i;
 					nn += i;
@@ -373,7 +373,7 @@ namespace Spine {
 				bone.ashearY = bone.shearY;
 				bone.ashearY = bone.shearY;
 			}
 			}
 
 
-			var updateCache = this.updateCache.Items;
+			IUpdatable[] updateCache = this.updateCache.Items;
 			for (int i = 0, n = this.updateCache.Count; i < n; i++)
 			for (int i = 0, n = this.updateCache.Count; i < n; i++)
 				updateCache[i].Update();
 				updateCache[i].Update();
 		}
 		}
@@ -402,9 +402,9 @@ namespace Spine {
 			rootBone.d = (pc * lb + pd * ld) * scaleY;
 			rootBone.d = (pc * lb + pd * ld) * scaleY;
 
 
 			// Update everything except root bone.
 			// Update everything except root bone.
-			var updateCache = this.updateCache.Items;
+			IUpdatable[] updateCache = this.updateCache.Items;
 			for (int i = 0, n = this.updateCache.Count; i < n; i++) {
 			for (int i = 0, n = this.updateCache.Count; i < n; i++) {
-				var updatable = updateCache[i];
+				IUpdatable updatable = updateCache[i];
 				if (updatable != rootBone) updatable.Update();
 				if (updatable != rootBone) updatable.Update();
 			}
 			}
 		}
 		}
@@ -417,7 +417,7 @@ namespace Spine {
 
 
 		/// <summary>Sets the bones and constraints to their setup pose values.</summary>
 		/// <summary>Sets the bones and constraints to their setup pose values.</summary>
 		public void SetBonesToSetupPose () {
 		public void SetBonesToSetupPose () {
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++)
 			for (int i = 0, n = this.bones.Count; i < n; i++)
 				bones[i].SetToSetupPose();
 				bones[i].SetToSetupPose();
 
 
@@ -457,7 +457,7 @@ namespace Spine {
 		}
 		}
 
 
 		public void SetSlotsToSetupPose () {
 		public void SetSlotsToSetupPose () {
-			var slots = this.slots.Items;
+			Slot[] slots = this.slots.Items;
 			int n = this.slots.Count;
 			int n = this.slots.Count;
 			Array.Copy(slots, 0, drawOrder.Items, 0, n);
 			Array.Copy(slots, 0, drawOrder.Items, 0, n);
 			for (int i = 0; i < n; i++)
 			for (int i = 0; i < n; i++)
@@ -469,7 +469,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public Bone FindBone (string boneName) {
 		public Bone FindBone (string boneName) {
 			if (boneName == null) throw new ArgumentNullException("boneName", "boneName cannot be null.");
 			if (boneName == null) throw new ArgumentNullException("boneName", "boneName cannot be null.");
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 				Bone bone = bones[i];
 				Bone bone = bones[i];
 				if (bone.data.name == boneName) return bone;
 				if (bone.data.name == boneName) return bone;
@@ -482,7 +482,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public Slot FindSlot (string slotName) {
 		public Slot FindSlot (string slotName) {
 			if (slotName == null) throw new ArgumentNullException("slotName", "slotName cannot be null.");
 			if (slotName == null) throw new ArgumentNullException("slotName", "slotName cannot be null.");
-			var slots = this.slots.Items;
+			Slot[] slots = this.slots.Items;
 			for (int i = 0, n = this.slots.Count; i < n; i++) {
 			for (int i = 0, n = this.slots.Count; i < n; i++) {
 				Slot slot = slots[i];
 				Slot slot = slots[i];
 				if (slot.data.name == slotName) return slot;
 				if (slot.data.name == slotName) return slot;
@@ -573,7 +573,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public IkConstraint FindIkConstraint (string constraintName) {
 		public IkConstraint FindIkConstraint (string constraintName) {
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
-			var ikConstraints = this.ikConstraints.Items;
+			IkConstraint[] ikConstraints = this.ikConstraints.Items;
 			for (int i = 0, n = this.ikConstraints.Count; i < n; i++) {
 			for (int i = 0, n = this.ikConstraints.Count; i < n; i++) {
 				IkConstraint ikConstraint = ikConstraints[i];
 				IkConstraint ikConstraint = ikConstraints[i];
 				if (ikConstraint.data.name == constraintName) return ikConstraint;
 				if (ikConstraint.data.name == constraintName) return ikConstraint;
@@ -586,7 +586,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public TransformConstraint FindTransformConstraint (string constraintName) {
 		public TransformConstraint FindTransformConstraint (string constraintName) {
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
-			var transformConstraints = this.transformConstraints.Items;
+			TransformConstraint[] transformConstraints = this.transformConstraints.Items;
 			for (int i = 0, n = this.transformConstraints.Count; i < n; i++) {
 			for (int i = 0, n = this.transformConstraints.Count; i < n; i++) {
 				TransformConstraint transformConstraint = transformConstraints[i];
 				TransformConstraint transformConstraint = transformConstraints[i];
 				if (transformConstraint.data.Name == constraintName) return transformConstraint;
 				if (transformConstraint.data.Name == constraintName) return transformConstraint;
@@ -599,7 +599,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public PathConstraint FindPathConstraint (string constraintName) {
 		public PathConstraint FindPathConstraint (string constraintName) {
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
-			var pathConstraints = this.pathConstraints.Items;
+			PathConstraint[] pathConstraints = this.pathConstraints.Items;
 			for (int i = 0, n = this.pathConstraints.Count; i < n; i++) {
 			for (int i = 0, n = this.pathConstraints.Count; i < n; i++) {
 				PathConstraint constraint = pathConstraints[i];
 				PathConstraint constraint = pathConstraints[i];
 				if (constraint.data.Name.Equals(constraintName)) return constraint;
 				if (constraint.data.Name.Equals(constraintName)) return constraint;
@@ -616,7 +616,7 @@ namespace Spine {
 		public void GetBounds (out float x, out float y, out float width, out float height, ref float[] vertexBuffer) {
 		public void GetBounds (out float x, out float y, out float width, out float height, ref float[] vertexBuffer) {
 			float[] temp = vertexBuffer;
 			float[] temp = vertexBuffer;
 			temp = temp ?? new float[8];
 			temp = temp ?? new float[8];
-			var drawOrder = this.drawOrder.Items;
+			Slot[] drawOrder = this.drawOrder.Items;
 			float minX = int.MaxValue, minY = int.MaxValue, maxX = int.MinValue, maxY = int.MinValue;
 			float minX = int.MaxValue, minY = int.MaxValue, maxX = int.MinValue, maxY = int.MinValue;
 			for (int i = 0, n = this.drawOrder.Count; i < n; i++) {
 			for (int i = 0, n = this.drawOrder.Count; i < n; i++) {
 				Slot slot = drawOrder[i];
 				Slot slot = drawOrder[i];
@@ -631,9 +631,8 @@ namespace Spine {
 					if (vertices.Length < 8) vertices = temp = new float[8];
 					if (vertices.Length < 8) vertices = temp = new float[8];
 					region.ComputeWorldVertices(slot, temp, 0, 2);
 					region.ComputeWorldVertices(slot, temp, 0, 2);
 				} else {
 				} else {
-					var meshAttachment = attachment as MeshAttachment;
-					if (meshAttachment != null) {
-						MeshAttachment mesh = meshAttachment;
+					MeshAttachment mesh = attachment as MeshAttachment;
+					if (mesh != null) {
 						verticesLength = mesh.WorldVerticesLength;
 						verticesLength = mesh.WorldVerticesLength;
 						vertices = temp;
 						vertices = temp;
 						if (vertices.Length < verticesLength) vertices = temp = new float[verticesLength];
 						if (vertices.Length < verticesLength) vertices = temp = new float[verticesLength];

+ 19 - 19
spine-csharp/src/SkeletonBinary.cs

@@ -83,7 +83,7 @@ namespace Spine {
 #if !ISUNITY && WINDOWS_STOREAPP
 #if !ISUNITY && WINDOWS_STOREAPP
 		private async Task<SkeletonData> ReadFile(string path) {
 		private async Task<SkeletonData> ReadFile(string path) {
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
-			using (var input = new BufferedStream(await folder.GetFileAsync(path).AsTask().ConfigureAwait(false))) {
+			using (BufferedStream input = new BufferedStream(await folder.GetFileAsync(path).AsTask().ConfigureAwait(false))) {
 				SkeletonData skeletonData = ReadSkeletonData(input);
 				SkeletonData skeletonData = ReadSkeletonData(input);
 				skeletonData.Name = Path.GetFileNameWithoutExtension(path);
 				skeletonData.Name = Path.GetFileNameWithoutExtension(path);
 				return skeletonData;
 				return skeletonData;
@@ -96,9 +96,9 @@ namespace Spine {
 #else
 #else
 		public override SkeletonData ReadSkeletonData (string path) {
 		public override SkeletonData ReadSkeletonData (string path) {
 #if WINDOWS_PHONE
 #if WINDOWS_PHONE
-			using (var input = new BufferedStream(Microsoft.Xna.Framework.TitleContainer.OpenStream(path))) {
+			using (BufferedStream input = new BufferedStream(Microsoft.Xna.Framework.TitleContainer.OpenStream(path))) {
 #else
 #else
-			using (var input = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)) {
+			using (FileStream input = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)) {
 #endif
 #endif
 				SkeletonData skeletonData = ReadSkeletonData(input);
 				SkeletonData skeletonData = ReadSkeletonData(input);
 				skeletonData.name = Path.GetFileNameWithoutExtension(path);
 				skeletonData.name = Path.GetFileNameWithoutExtension(path);
@@ -127,7 +127,7 @@ namespace Spine {
 			if (file == null) throw new ArgumentNullException("file");
 			if (file == null) throw new ArgumentNullException("file");
 			float scale = this.scale;
 			float scale = this.scale;
 
 
-			var skeletonData = new SkeletonData();
+			SkeletonData skeletonData = new SkeletonData();
 			SkeletonInput input = new SkeletonInput(file);
 			SkeletonInput input = new SkeletonInput(file);
 
 
 			long hash = input.ReadLong();
 			long hash = input.ReadLong();
@@ -162,7 +162,7 @@ namespace Spine {
 				o[i] = input.ReadString();
 				o[i] = input.ReadString();
 
 
 			// Bones.
 			// Bones.
-			var bones = skeletonData.bones.Resize(n = input.ReadInt(true)).Items;
+			BoneData[] bones = skeletonData.bones.Resize(n = input.ReadInt(true)).Items;
 			for (int i = 0; i < n; i++) {
 			for (int i = 0; i < n; i++) {
 				String name = input.ReadString();
 				String name = input.ReadString();
 				BoneData parent = i == 0 ? null : bones[input.ReadInt(true)];
 				BoneData parent = i == 0 ? null : bones[input.ReadInt(true)];
@@ -182,7 +182,7 @@ namespace Spine {
 			}
 			}
 
 
 			// Slots.
 			// Slots.
-			var slots = skeletonData.slots.Resize(n = input.ReadInt(true)).Items;
+			SlotData[] slots = skeletonData.slots.Resize(n = input.ReadInt(true)).Items;
 			for (int i = 0; i < n; i++) {
 			for (int i = 0; i < n; i++) {
 				String slotName = input.ReadString();
 				String slotName = input.ReadString();
 				BoneData boneData = bones[input.ReadInt(true)];
 				BoneData boneData = bones[input.ReadInt(true)];
@@ -212,7 +212,7 @@ namespace Spine {
 				IkConstraintData data = new IkConstraintData(input.ReadString());
 				IkConstraintData data = new IkConstraintData(input.ReadString());
 				data.order = input.ReadInt(true);
 				data.order = input.ReadInt(true);
 				data.skinRequired = input.ReadBoolean();
 				data.skinRequired = input.ReadBoolean();
-				var constraintBones = data.bones.Resize(nn = input.ReadInt(true)).Items;
+				BoneData[] constraintBones = data.bones.Resize(nn = input.ReadInt(true)).Items;
 				for (int ii = 0; ii < nn; ii++)
 				for (int ii = 0; ii < nn; ii++)
 					constraintBones[ii] = bones[input.ReadInt(true)];
 					constraintBones[ii] = bones[input.ReadInt(true)];
 				data.target = bones[input.ReadInt(true)];
 				data.target = bones[input.ReadInt(true)];
@@ -231,7 +231,7 @@ namespace Spine {
 				TransformConstraintData data = new TransformConstraintData(input.ReadString());
 				TransformConstraintData data = new TransformConstraintData(input.ReadString());
 				data.order = input.ReadInt(true);
 				data.order = input.ReadInt(true);
 				data.skinRequired = input.ReadBoolean();
 				data.skinRequired = input.ReadBoolean();
-				var constraintBones = data.bones.Resize(nn = input.ReadInt(true)).Items;
+				BoneData[] constraintBones = data.bones.Resize(nn = input.ReadInt(true)).Items;
 				for (int ii = 0; ii < nn; ii++)
 				for (int ii = 0; ii < nn; ii++)
 					constraintBones[ii] = bones[input.ReadInt(true)];
 					constraintBones[ii] = bones[input.ReadInt(true)];
 				data.target = bones[input.ReadInt(true)];
 				data.target = bones[input.ReadInt(true)];
@@ -341,17 +341,17 @@ namespace Spine {
 			} else {
 			} else {
 				skin = new Skin(input.ReadStringRef());
 				skin = new Skin(input.ReadStringRef());
 				Object[] bones = skin.bones.Resize(input.ReadInt(true)).Items;
 				Object[] bones = skin.bones.Resize(input.ReadInt(true)).Items;
-				var bonesItems = skeletonData.bones.Items;
+				BoneData[] bonesItems = skeletonData.bones.Items;
 				for (int i = 0, n = skin.bones.Count; i < n; i++)
 				for (int i = 0, n = skin.bones.Count; i < n; i++)
 					bones[i] = bonesItems[input.ReadInt(true)];
 					bones[i] = bonesItems[input.ReadInt(true)];
 
 
-				var ikConstraintsItems = skeletonData.ikConstraints.Items;
+				IkConstraintData[] ikConstraintsItems = skeletonData.ikConstraints.Items;
 				for (int i = 0, n = input.ReadInt(true); i < n; i++)
 				for (int i = 0, n = input.ReadInt(true); i < n; i++)
 					skin.constraints.Add(ikConstraintsItems[input.ReadInt(true)]);
 					skin.constraints.Add(ikConstraintsItems[input.ReadInt(true)]);
-				var transformConstraintsItems = skeletonData.transformConstraints.Items;
+				TransformConstraintData[] transformConstraintsItems = skeletonData.transformConstraints.Items;
 				for (int i = 0, n = input.ReadInt(true); i < n; i++)
 				for (int i = 0, n = input.ReadInt(true); i < n; i++)
 					skin.constraints.Add(transformConstraintsItems[input.ReadInt(true)]);
 					skin.constraints.Add(transformConstraintsItems[input.ReadInt(true)]);
-				var pathConstraintsItems = skeletonData.pathConstraints.Items;
+				PathConstraintData[] pathConstraintsItems = skeletonData.pathConstraints.Items;
 				for (int i = 0, n = input.ReadInt(true); i < n; i++)
 				for (int i = 0, n = input.ReadInt(true); i < n; i++)
 					skin.constraints.Add(pathConstraintsItems[input.ReadInt(true)]);
 					skin.constraints.Add(pathConstraintsItems[input.ReadInt(true)]);
 				skin.constraints.TrimExcess();
 				skin.constraints.TrimExcess();
@@ -561,8 +561,8 @@ namespace Spine {
 				vertices.vertices = ReadFloatArray(input, verticesLength, scale);
 				vertices.vertices = ReadFloatArray(input, verticesLength, scale);
 				return vertices;
 				return vertices;
 			}
 			}
-			var weights = new ExposedList<float>(verticesLength * 3 * 3);
-			var bonesArray = new ExposedList<int>(verticesLength * 3);
+			ExposedList<float> weights = new ExposedList<float>(verticesLength * 3 * 3);
+			ExposedList<int> bonesArray = new ExposedList<int>(verticesLength * 3);
 			for (int i = 0; i < vertexCount; i++) {
 			for (int i = 0; i < vertexCount; i++) {
 				int boneCount = input.ReadInt(true);
 				int boneCount = input.ReadInt(true);
 				bonesArray.Add(boneCount);
 				bonesArray.Add(boneCount);
@@ -602,7 +602,7 @@ namespace Spine {
 		/// <exception cref="SerializationException">SerializationException will be thrown when a Vertex attachment is not found.</exception>
 		/// <exception cref="SerializationException">SerializationException will be thrown when a Vertex attachment is not found.</exception>
 		/// <exception cref="IOException">Throws IOException when a read operation fails.</exception>
 		/// <exception cref="IOException">Throws IOException when a read operation fails.</exception>
 		private Animation ReadAnimation (String name, SkeletonInput input, SkeletonData skeletonData) {
 		private Animation ReadAnimation (String name, SkeletonInput input, SkeletonData skeletonData) {
-			var timelines = new ExposedList<Timeline>(input.ReadInt(true));
+			ExposedList<Timeline> timelines = new ExposedList<Timeline>(input.ReadInt(true));
 			float scale = this.scale;
 			float scale = this.scale;
 
 
 			// Slot timelines.
 			// Slot timelines.
@@ -1049,7 +1049,7 @@ namespace Spine {
 			}
 			}
 
 
 			float duration = 0;
 			float duration = 0;
-			var items = timelines.Items;
+			Timeline[] items = timelines.Items;
 			for (int i = 0, n = timelines.Count; i < n; i++)
 			for (int i = 0, n = timelines.Count; i < n; i++)
 				duration = Math.Max(duration, items[i].Duration);
 				duration = Math.Max(duration, items[i].Duration);
 			return new Animation(name, timelines, duration);
 			return new Animation(name, timelines, duration);
@@ -1221,10 +1221,10 @@ namespace Spine {
 			public string GetVersionString () {
 			public string GetVersionString () {
 				try {
 				try {
 					// try reading 4.0+ format
 					// try reading 4.0+ format
-					var initialPosition = input.Position;
+					long initialPosition = input.Position;
 					ReadLong(); // long hash
 					ReadLong(); // long hash
 
 
-					var stringPosition = input.Position;
+					long stringPosition = input.Position;
 					int stringByteCount = ReadInt(true);
 					int stringByteCount = ReadInt(true);
 					input.Position = stringPosition;
 					input.Position = stringPosition;
 					if (stringByteCount <= 13) {
 					if (stringByteCount <= 13) {
@@ -1250,7 +1250,7 @@ namespace Spine {
 				byteCount = ReadInt(true);
 				byteCount = ReadInt(true);
 				if (byteCount > 1 && byteCount <= 13) {
 				if (byteCount > 1 && byteCount <= 13) {
 					byteCount--;
 					byteCount--;
-					var buffer = new byte[byteCount];
+					byte[] buffer = new byte[byteCount];
 					ReadFully(buffer, 0, byteCount);
 					ReadFully(buffer, 0, byteCount);
 					return System.Text.Encoding.UTF8.GetString(buffer, 0, byteCount);
 					return System.Text.Encoding.UTF8.GetString(buffer, 0, byteCount);
 				}
 				}

+ 6 - 6
spine-csharp/src/SkeletonClipping.cs

@@ -57,7 +57,7 @@ namespace Spine {
 			clip.ComputeWorldVertices(slot, 0, n, vertices, 0, 2);
 			clip.ComputeWorldVertices(slot, 0, n, vertices, 0, 2);
 			MakeClockwise(clippingPolygon);
 			MakeClockwise(clippingPolygon);
 			clippingPolygons = triangulator.Decompose(clippingPolygon, triangulator.Triangulate(clippingPolygon));
 			clippingPolygons = triangulator.Decompose(clippingPolygon, triangulator.Triangulate(clippingPolygon));
-			foreach (var polygon in clippingPolygons) {
+			foreach (ExposedList<float> polygon in clippingPolygons) {
 				MakeClockwise(polygon);
 				MakeClockwise(polygon);
 				polygon.Add(polygon.Items[0]);
 				polygon.Add(polygon.Items[0]);
 				polygon.Add(polygon.Items[1]);
 				polygon.Add(polygon.Items[1]);
@@ -80,8 +80,8 @@ namespace Spine {
 
 
 		public void ClipTriangles (float[] vertices, int verticesLength, int[] triangles, int trianglesLength, float[] uvs) {
 		public void ClipTriangles (float[] vertices, int verticesLength, int[] triangles, int trianglesLength, float[] uvs) {
 			ExposedList<float> clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;
 			ExposedList<float> clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;
-			var clippedTriangles = this.clippedTriangles;
-			var polygons = clippingPolygons.Items;
+			ExposedList<int> clippedTriangles = this.clippedTriangles;
+			ExposedList<float>[] polygons = clippingPolygons.Items;
 			int polygonsCount = clippingPolygons.Count;
 			int polygonsCount = clippingPolygons.Count;
 
 
 			int index = 0;
 			int index = 0;
@@ -170,8 +170,8 @@ namespace Spine {
 		/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping
 		/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping
 		 * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */
 		 * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */
 		internal bool Clip (float x1, float y1, float x2, float y2, float x3, float y3, ExposedList<float> clippingArea, ExposedList<float> output) {
 		internal bool Clip (float x1, float y1, float x2, float y2, float x3, float y3, ExposedList<float> clippingArea, ExposedList<float> output) {
-			var originalOutput = output;
-			var clipped = false;
+			ExposedList<float> originalOutput = output;
+			bool clipped = false;
 
 
 			// Avoid copy at the end.
 			// Avoid copy at the end.
 			ExposedList<float> input = null;
 			ExposedList<float> input = null;
@@ -249,7 +249,7 @@ namespace Spine {
 				output.Add(output.Items[1]);
 				output.Add(output.Items[1]);
 
 
 				if (i == clippingVerticesLast) break;
 				if (i == clippingVerticesLast) break;
-				var temp = output;
+				ExposedList<float> temp = output;
 				output = input;
 				output = input;
 				output.Clear();
 				output.Clear();
 				input = temp;
 				input = temp;

+ 6 - 6
spine-csharp/src/SkeletonData.cs

@@ -103,7 +103,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public BoneData FindBone (string boneName) {
 		public BoneData FindBone (string boneName) {
 			if (boneName == null) throw new ArgumentNullException("boneName", "boneName cannot be null.");
 			if (boneName == null) throw new ArgumentNullException("boneName", "boneName cannot be null.");
-			var bones = this.bones.Items;
+			BoneData[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 				BoneData bone = bones[i];
 				BoneData bone = bones[i];
 				if (bone.name == boneName) return bone;
 				if (bone.name == boneName) return bone;
@@ -116,7 +116,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public SlotData FindSlot (string slotName) {
 		public SlotData FindSlot (string slotName) {
 			if (slotName == null) throw new ArgumentNullException("slotName", "slotName cannot be null.");
 			if (slotName == null) throw new ArgumentNullException("slotName", "slotName cannot be null.");
-			var slots = this.slots.Items;
+			SlotData[] slots = this.slots.Items;
 			for (int i = 0, n = this.slots.Count; i < n; i++) {
 			for (int i = 0, n = this.slots.Count; i < n; i++) {
 				SlotData slot = slots[i];
 				SlotData slot = slots[i];
 				if (slot.name == slotName) return slot;
 				if (slot.name == slotName) return slot;
@@ -149,7 +149,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public Animation FindAnimation (string animationName) {
 		public Animation FindAnimation (string animationName) {
 			if (animationName == null) throw new ArgumentNullException("animationName", "animationName cannot be null.");
 			if (animationName == null) throw new ArgumentNullException("animationName", "animationName cannot be null.");
-			var animations = this.animations.Items;
+			Animation[] animations = this.animations.Items;
 			for (int i = 0, n = this.animations.Count; i < n; i++) {
 			for (int i = 0, n = this.animations.Count; i < n; i++) {
 				Animation animation = animations[i];
 				Animation animation = animations[i];
 				if (animation.name == animationName) return animation;
 				if (animation.name == animationName) return animation;
@@ -162,7 +162,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public IkConstraintData FindIkConstraint (string constraintName) {
 		public IkConstraintData FindIkConstraint (string constraintName) {
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
-			var ikConstraints = this.ikConstraints.Items;
+			IkConstraintData[] ikConstraints = this.ikConstraints.Items;
 			for (int i = 0, n = this.ikConstraints.Count; i < n; i++) {
 			for (int i = 0, n = this.ikConstraints.Count; i < n; i++) {
 				IkConstraintData ikConstraint = ikConstraints[i];
 				IkConstraintData ikConstraint = ikConstraints[i];
 				if (ikConstraint.name == constraintName) return ikConstraint;
 				if (ikConstraint.name == constraintName) return ikConstraint;
@@ -175,7 +175,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public TransformConstraintData FindTransformConstraint (string constraintName) {
 		public TransformConstraintData FindTransformConstraint (string constraintName) {
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
-			var transformConstraints = this.transformConstraints.Items;
+			TransformConstraintData[] transformConstraints = this.transformConstraints.Items;
 			for (int i = 0, n = this.transformConstraints.Count; i < n; i++) {
 			for (int i = 0, n = this.transformConstraints.Count; i < n; i++) {
 				TransformConstraintData transformConstraint = transformConstraints[i];
 				TransformConstraintData transformConstraint = transformConstraints[i];
 				if (transformConstraint.name == constraintName) return transformConstraint;
 				if (transformConstraint.name == constraintName) return transformConstraint;
@@ -192,7 +192,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		/// <returns>May be null.</returns>
 		public PathConstraintData FindPathConstraint (string constraintName) {
 		public PathConstraintData FindPathConstraint (string constraintName) {
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
 			if (constraintName == null) throw new ArgumentNullException("constraintName", "constraintName cannot be null.");
-			var pathConstraints = this.pathConstraints.Items;
+			PathConstraintData[] pathConstraints = this.pathConstraints.Items;
 			for (int i = 0, n = this.pathConstraints.Count; i < n; i++) {
 			for (int i = 0, n = this.pathConstraints.Count; i < n; i++) {
 				PathConstraintData constraint = pathConstraints[i];
 				PathConstraintData constraint = pathConstraints[i];
 				if (constraint.name.Equals(constraintName)) return constraint;
 				if (constraint.name.Equals(constraintName)) return constraint;

+ 80 - 80
spine-csharp/src/SkeletonJson.cs

@@ -65,7 +65,7 @@ namespace Spine {
 		private async Task<SkeletonData> ReadFile(string path) {
 		private async Task<SkeletonData> ReadFile(string path) {
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
 			var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
 			var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
-			using (var reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
+			using (StreamReader reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
 				SkeletonData skeletonData = ReadSkeletonData(reader);
 				SkeletonData skeletonData = ReadSkeletonData(reader);
 				skeletonData.Name = Path.GetFileNameWithoutExtension(path);
 				skeletonData.Name = Path.GetFileNameWithoutExtension(path);
 				return skeletonData;
 				return skeletonData;
@@ -78,9 +78,9 @@ namespace Spine {
 #else
 #else
 		public override SkeletonData ReadSkeletonData (string path) {
 		public override SkeletonData ReadSkeletonData (string path) {
 #if WINDOWS_PHONE
 #if WINDOWS_PHONE
-			using (var reader = new StreamReader(Microsoft.Xna.Framework.TitleContainer.OpenStream(path))) {
+			using (StreamReader reader = new StreamReader(Microsoft.Xna.Framework.TitleContainer.OpenStream(path))) {
 #else
 #else
-			using (var reader = new StreamReader(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))) {
+			using (StreamReader reader = new StreamReader(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))) {
 #endif
 #endif
 				SkeletonData skeletonData = ReadSkeletonData(reader);
 				SkeletonData skeletonData = ReadSkeletonData(reader);
 				skeletonData.name = Path.GetFileNameWithoutExtension(path);
 				skeletonData.name = Path.GetFileNameWithoutExtension(path);
@@ -93,14 +93,14 @@ namespace Spine {
 			if (reader == null) throw new ArgumentNullException("reader", "reader cannot be null.");
 			if (reader == null) throw new ArgumentNullException("reader", "reader cannot be null.");
 
 
 			float scale = this.scale;
 			float scale = this.scale;
-			var skeletonData = new SkeletonData();
+			SkeletonData skeletonData = new SkeletonData();
 
 
-			var root = Json.Deserialize(reader) as Dictionary<string, Object>;
+			Dictionary<string, object> root = Json.Deserialize(reader) as Dictionary<string, Object>;
 			if (root == null) throw new Exception("Invalid JSON.");
 			if (root == null) throw new Exception("Invalid JSON.");
 
 
 			// Skeleton.
 			// Skeleton.
 			if (root.ContainsKey("skeleton")) {
 			if (root.ContainsKey("skeleton")) {
-				var skeletonMap = (Dictionary<string, Object>)root["skeleton"];
+				Dictionary<string, object> skeletonMap = (Dictionary<string, Object>)root["skeleton"];
 				skeletonData.hash = (string)skeletonMap["hash"];
 				skeletonData.hash = (string)skeletonMap["hash"];
 				skeletonData.version = (string)skeletonMap["spine"];
 				skeletonData.version = (string)skeletonMap["spine"];
 				skeletonData.x = GetFloat(skeletonMap, "x", 0);
 				skeletonData.x = GetFloat(skeletonMap, "x", 0);
@@ -121,7 +121,7 @@ namespace Spine {
 						if (parent == null)
 						if (parent == null)
 							throw new Exception("Parent bone not found: " + boneMap["parent"]);
 							throw new Exception("Parent bone not found: " + boneMap["parent"]);
 					}
 					}
-					var data = new BoneData(skeletonData.Bones.Count, (string)boneMap["name"], parent);
+					BoneData data = new BoneData(skeletonData.Bones.Count, (string)boneMap["name"], parent);
 					data.length = GetFloat(boneMap, "length", 0) * scale;
 					data.length = GetFloat(boneMap, "length", 0) * scale;
 					data.x = GetFloat(boneMap, "x", 0) * scale;
 					data.x = GetFloat(boneMap, "x", 0) * scale;
 					data.y = GetFloat(boneMap, "y", 0) * scale;
 					data.y = GetFloat(boneMap, "y", 0) * scale;
@@ -142,11 +142,11 @@ namespace Spine {
 			// Slots.
 			// Slots.
 			if (root.ContainsKey("slots")) {
 			if (root.ContainsKey("slots")) {
 				foreach (Dictionary<string, Object> slotMap in (List<Object>)root["slots"]) {
 				foreach (Dictionary<string, Object> slotMap in (List<Object>)root["slots"]) {
-					var slotName = (string)slotMap["name"];
-					var boneName = (string)slotMap["bone"];
+					string slotName = (string)slotMap["name"];
+					string boneName = (string)slotMap["bone"];
 					BoneData boneData = skeletonData.FindBone(boneName);
 					BoneData boneData = skeletonData.FindBone(boneName);
 					if (boneData == null) throw new Exception("Slot bone not found: " + boneName);
 					if (boneData == null) throw new Exception("Slot bone not found: " + boneName);
-					var data = new SlotData(skeletonData.Slots.Count, slotName, boneData);
+					SlotData data = new SlotData(skeletonData.Slots.Count, slotName, boneData);
 
 
 					if (slotMap.ContainsKey("color")) {
 					if (slotMap.ContainsKey("color")) {
 						string color = (string)slotMap["color"];
 						string color = (string)slotMap["color"];
@@ -157,7 +157,7 @@ namespace Spine {
 					}
 					}
 
 
 					if (slotMap.ContainsKey("dark")) {
 					if (slotMap.ContainsKey("dark")) {
-						var color2 = (string)slotMap["dark"];
+						string color2 = (string)slotMap["dark"];
 						data.r2 = ToColor(color2, 0, 6); // expectedLength = 6. ie. "RRGGBB"
 						data.r2 = ToColor(color2, 0, 6); // expectedLength = 6. ie. "RRGGBB"
 						data.g2 = ToColor(color2, 1, 6);
 						data.g2 = ToColor(color2, 1, 6);
 						data.b2 = ToColor(color2, 2, 6);
 						data.b2 = ToColor(color2, 2, 6);
@@ -345,8 +345,8 @@ namespace Spine {
 			// Events.
 			// Events.
 			if (root.ContainsKey("events")) {
 			if (root.ContainsKey("events")) {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)root["events"]) {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)root["events"]) {
-					var entryMap = (Dictionary<string, Object>)entry.Value;
-					var data = new EventData(entry.Key);
+					Dictionary<string, object> entryMap = (Dictionary<string, Object>)entry.Value;
+					EventData data = new EventData(entry.Key);
 					data.Int = GetInt(entryMap, "int", 0);
 					data.Int = GetInt(entryMap, "int", 0);
 					data.Float = GetFloat(entryMap, "float", 0);
 					data.Float = GetFloat(entryMap, "float", 0);
 					data.String = GetString(entryMap, "string", string.Empty);
 					data.String = GetString(entryMap, "string", string.Empty);
@@ -383,8 +383,8 @@ namespace Spine {
 			float scale = this.scale;
 			float scale = this.scale;
 			name = GetString(map, "name", name);
 			name = GetString(map, "name", name);
 
 
-			var typeName = GetString(map, "type", "region");
-			var type = (AttachmentType)Enum.Parse(typeof(AttachmentType), typeName, true);
+			string typeName = GetString(map, "type", "region");
+			AttachmentType type = (AttachmentType)Enum.Parse(typeof(AttachmentType), typeName, true);
 
 
 			switch (type) {
 			switch (type) {
 			case AttachmentType.Region: {
 			case AttachmentType.Region: {
@@ -405,7 +405,7 @@ namespace Spine {
 				region.sequence = sequence;
 				region.sequence = sequence;
 
 
 				if (map.ContainsKey("color")) {
 				if (map.ContainsKey("color")) {
-					var color = (string)map["color"];
+					string color = (string)map["color"];
 					region.r = ToColor(color, 0);
 					region.r = ToColor(color, 0);
 					region.g = ToColor(color, 1);
 					region.g = ToColor(color, 1);
 					region.b = ToColor(color, 2);
 					region.b = ToColor(color, 2);
@@ -431,7 +431,7 @@ namespace Spine {
 				mesh.Path = path;
 				mesh.Path = path;
 
 
 				if (map.ContainsKey("color")) {
 				if (map.ContainsKey("color")) {
-					var color = (string)map["color"];
+					string color = (string)map["color"];
 					mesh.r = ToColor(color, 0);
 					mesh.r = ToColor(color, 0);
 					mesh.g = ToColor(color, 1);
 					mesh.g = ToColor(color, 1);
 					mesh.b = ToColor(color, 2);
 					mesh.b = ToColor(color, 2);
@@ -504,7 +504,7 @@ namespace Spine {
 		}
 		}
 
 
 		public static Sequence ReadSequence (object sequenceJson) {
 		public static Sequence ReadSequence (object sequenceJson) {
-			var map = sequenceJson as Dictionary<string, Object>;
+			Dictionary<string, object> map = sequenceJson as Dictionary<string, Object>;
 			if (map == null) return null;
 			if (map == null) return null;
 			Sequence sequence = new Sequence(GetInt(map, "count"));
 			Sequence sequence = new Sequence(GetInt(map, "count"));
 			sequence.start = GetInt(map, "start", 1);
 			sequence.start = GetInt(map, "start", 1);
@@ -550,22 +550,22 @@ namespace Spine {
 		}
 		}
 
 
 		private void ReadAnimation (Dictionary<string, Object> map, string name, SkeletonData skeletonData) {
 		private void ReadAnimation (Dictionary<string, Object> map, string name, SkeletonData skeletonData) {
-			var scale = this.scale;
-			var timelines = new ExposedList<Timeline>();
+			float scale = this.scale;
+			ExposedList<Timeline> timelines = new ExposedList<Timeline>();
 
 
 			// Slot timelines.
 			// Slot timelines.
 			if (map.ContainsKey("slots")) {
 			if (map.ContainsKey("slots")) {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)map["slots"]) {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)map["slots"]) {
 					string slotName = entry.Key;
 					string slotName = entry.Key;
 					int slotIndex = FindSlotIndex(skeletonData, slotName);
 					int slotIndex = FindSlotIndex(skeletonData, slotName);
-					var timelineMap = (Dictionary<string, Object>)entry.Value;
+					Dictionary<string, object> timelineMap = (Dictionary<string, Object>)entry.Value;
 					foreach (KeyValuePair<string, Object> timelineEntry in timelineMap) {
 					foreach (KeyValuePair<string, Object> timelineEntry in timelineMap) {
-						var values = (List<Object>)timelineEntry.Value;
+						List<object> values = (List<Object>)timelineEntry.Value;
 						int frames = values.Count;
 						int frames = values.Count;
 						if (frames == 0) continue;
 						if (frames == 0) continue;
-						var timelineName = (string)timelineEntry.Key;
+						string timelineName = (string)timelineEntry.Key;
 						if (timelineName == "attachment") {
 						if (timelineName == "attachment") {
-							var timeline = new AttachmentTimeline(frames, slotIndex);
+							AttachmentTimeline timeline = new AttachmentTimeline(frames, slotIndex);
 							int frame = 0;
 							int frame = 0;
 							foreach (Dictionary<string, Object> keyMap in values) {
 							foreach (Dictionary<string, Object> keyMap in values) {
 								timeline.SetFrame(frame++, GetFloat(keyMap, "time", 0), GetString(keyMap, "name", null));
 								timeline.SetFrame(frame++, GetFloat(keyMap, "time", 0), GetString(keyMap, "name", null));
@@ -573,11 +573,11 @@ namespace Spine {
 							timelines.Add(timeline);
 							timelines.Add(timeline);
 
 
 						} else if (timelineName == "rgba") {
 						} else if (timelineName == "rgba") {
-							var timeline = new RGBATimeline(frames, frames << 2, slotIndex);
+							RGBATimeline timeline = new RGBATimeline(frames, frames << 2, slotIndex);
 
 
-							var keyMapEnumerator = values.GetEnumerator();
+							List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 							keyMapEnumerator.MoveNext();
 							keyMapEnumerator.MoveNext();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["color"];
 							string color = (string)keyMap["color"];
 							float r = ToColor(color, 0);
 							float r = ToColor(color, 0);
@@ -590,7 +590,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									timeline.Shrink(bezier);
 									break;
 									break;
 								}
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["color"];
 								color = (string)nextMap["color"];
@@ -616,11 +616,11 @@ namespace Spine {
 							timelines.Add(timeline);
 							timelines.Add(timeline);
 
 
 						} else if (timelineName == "rgb") {
 						} else if (timelineName == "rgb") {
-							var timeline = new RGBTimeline(frames, frames * 3, slotIndex);
+							RGBTimeline timeline = new RGBTimeline(frames, frames * 3, slotIndex);
 
 
-							var keyMapEnumerator = values.GetEnumerator();
+							List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 							keyMapEnumerator.MoveNext();
 							keyMapEnumerator.MoveNext();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["color"];
 							string color = (string)keyMap["color"];
 							float r = ToColor(color, 0, 6);
 							float r = ToColor(color, 0, 6);
@@ -632,7 +632,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									timeline.Shrink(bezier);
 									break;
 									break;
 								}
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["color"];
 								color = (string)nextMap["color"];
@@ -655,16 +655,16 @@ namespace Spine {
 							timelines.Add(timeline);
 							timelines.Add(timeline);
 
 
 						} else if (timelineName == "alpha") {
 						} else if (timelineName == "alpha") {
-							var keyMapEnumerator = values.GetEnumerator();
+							List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 							keyMapEnumerator.MoveNext();
 							keyMapEnumerator.MoveNext();
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, new AlphaTimeline(frames, frames, slotIndex), 0, 1));
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, new AlphaTimeline(frames, frames, slotIndex), 0, 1));
 
 
 						} else if (timelineName == "rgba2") {
 						} else if (timelineName == "rgba2") {
-							var timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);
+							RGBA2Timeline timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);
 
 
-							var keyMapEnumerator = values.GetEnumerator();
+							List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 							keyMapEnumerator.MoveNext();
 							keyMapEnumerator.MoveNext();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["light"];
 							string color = (string)keyMap["light"];
 							float r = ToColor(color, 0);
 							float r = ToColor(color, 0);
@@ -681,7 +681,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									timeline.Shrink(bezier);
 									break;
 									break;
 								}
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["light"];
 								color = (string)nextMap["light"];
@@ -717,11 +717,11 @@ namespace Spine {
 							timelines.Add(timeline);
 							timelines.Add(timeline);
 
 
 						} else if (timelineName == "rgb2") {
 						} else if (timelineName == "rgb2") {
-							var timeline = new RGB2Timeline(frames, frames * 6, slotIndex);
+							RGB2Timeline timeline = new RGB2Timeline(frames, frames * 6, slotIndex);
 
 
-							var keyMapEnumerator = values.GetEnumerator();
+							List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 							keyMapEnumerator.MoveNext();
 							keyMapEnumerator.MoveNext();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["light"];
 							string color = (string)keyMap["light"];
 							float r = ToColor(color, 0, 6);
 							float r = ToColor(color, 0, 6);
@@ -737,7 +737,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									timeline.Shrink(bezier);
 									break;
 									break;
 								}
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["light"];
 								color = (string)nextMap["light"];
@@ -780,7 +780,7 @@ namespace Spine {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)map["bones"]) {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)map["bones"]) {
 					string boneName = entry.Key;
 					string boneName = entry.Key;
 					int boneIndex = -1;
 					int boneIndex = -1;
-					var bones = skeletonData.bones.Items;
+					BoneData[] bones = skeletonData.bones.Items;
 					for (int i = 0, n = skeletonData.bones.Count; i < n; i++) {
 					for (int i = 0, n = skeletonData.bones.Count; i < n; i++) {
 						if (bones[i].name == boneName) {
 						if (bones[i].name == boneName) {
 							boneIndex = i;
 							boneIndex = i;
@@ -788,13 +788,13 @@ namespace Spine {
 						}
 						}
 					}
 					}
 					if (boneIndex == -1) throw new Exception("Bone not found: " + boneName);
 					if (boneIndex == -1) throw new Exception("Bone not found: " + boneName);
-					var timelineMap = (Dictionary<string, Object>)entry.Value;
+					Dictionary<string, object> timelineMap = (Dictionary<string, Object>)entry.Value;
 					foreach (KeyValuePair<string, Object> timelineEntry in timelineMap) {
 					foreach (KeyValuePair<string, Object> timelineEntry in timelineMap) {
-						var values = (List<Object>)timelineEntry.Value;
-						var keyMapEnumerator = values.GetEnumerator();
+						List<object> values = (List<Object>)timelineEntry.Value;
+						List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 						if (!keyMapEnumerator.MoveNext()) continue;
 						if (!keyMapEnumerator.MoveNext()) continue;
 						int frames = values.Count;
 						int frames = values.Count;
-						var timelineName = (string)timelineEntry.Key;
+						string timelineName = (string)timelineEntry.Key;
 						if (timelineName == "rotate")
 						if (timelineName == "rotate")
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, new RotateTimeline(frames, frames, boneIndex), 0, 1));
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, new RotateTimeline(frames, frames, boneIndex), 0, 1));
 						else if (timelineName == "translate") {
 						else if (timelineName == "translate") {
@@ -829,10 +829,10 @@ namespace Spine {
 			// IK constraint timelines.
 			// IK constraint timelines.
 			if (map.ContainsKey("ik")) {
 			if (map.ContainsKey("ik")) {
 				foreach (KeyValuePair<string, Object> timelineMap in (Dictionary<string, Object>)map["ik"]) {
 				foreach (KeyValuePair<string, Object> timelineMap in (Dictionary<string, Object>)map["ik"]) {
-					var values = (List<Object>)timelineMap.Value;
-					var keyMapEnumerator = values.GetEnumerator();
+					List<object> values = (List<Object>)timelineMap.Value;
+					List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 					if (!keyMapEnumerator.MoveNext()) continue;
 					if (!keyMapEnumerator.MoveNext()) continue;
-					var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+					Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 					IkConstraintData constraint = skeletonData.FindIkConstraint(timelineMap.Key);
 					IkConstraintData constraint = skeletonData.FindIkConstraint(timelineMap.Key);
 					IkConstraintTimeline timeline = new IkConstraintTimeline(values.Count, values.Count << 1,
 					IkConstraintTimeline timeline = new IkConstraintTimeline(values.Count, values.Count << 1,
 						skeletonData.IkConstraints.IndexOf(constraint));
 						skeletonData.IkConstraints.IndexOf(constraint));
@@ -845,7 +845,7 @@ namespace Spine {
 							timeline.Shrink(bezier);
 							timeline.Shrink(bezier);
 							break;
 							break;
 						}
 						}
-						var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+						Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 						float time2 = GetFloat(nextMap, "time", 0);
 						float time2 = GetFloat(nextMap, "time", 0);
 						float mix2 = GetFloat(nextMap, "mix", 1), softness2 = GetFloat(nextMap, "softness", 0) * scale;
 						float mix2 = GetFloat(nextMap, "mix", 1), softness2 = GetFloat(nextMap, "softness", 0) * scale;
 						if (keyMap.ContainsKey("curve")) {
 						if (keyMap.ContainsKey("curve")) {
@@ -865,10 +865,10 @@ namespace Spine {
 			// Transform constraint timelines.
 			// Transform constraint timelines.
 			if (map.ContainsKey("transform")) {
 			if (map.ContainsKey("transform")) {
 				foreach (KeyValuePair<string, Object> timelineMap in (Dictionary<string, Object>)map["transform"]) {
 				foreach (KeyValuePair<string, Object> timelineMap in (Dictionary<string, Object>)map["transform"]) {
-					var values = (List<Object>)timelineMap.Value;
-					var keyMapEnumerator = values.GetEnumerator();
+					List<object> values = (List<Object>)timelineMap.Value;
+					List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 					if (!keyMapEnumerator.MoveNext()) continue;
 					if (!keyMapEnumerator.MoveNext()) continue;
-					var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+					Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 					TransformConstraintData constraint = skeletonData.FindTransformConstraint(timelineMap.Key);
 					TransformConstraintData constraint = skeletonData.FindTransformConstraint(timelineMap.Key);
 					TransformConstraintTimeline timeline = new TransformConstraintTimeline(values.Count, values.Count * 6,
 					TransformConstraintTimeline timeline = new TransformConstraintTimeline(values.Count, values.Count * 6,
 						skeletonData.TransformConstraints.IndexOf(constraint));
 						skeletonData.TransformConstraints.IndexOf(constraint));
@@ -882,7 +882,7 @@ namespace Spine {
 							timeline.Shrink(bezier);
 							timeline.Shrink(bezier);
 							break;
 							break;
 						}
 						}
-						var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+						Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 						float time2 = GetFloat(nextMap, "time", 0);
 						float time2 = GetFloat(nextMap, "time", 0);
 						float mixRotate2 = GetFloat(nextMap, "mixRotate", 1), mixShearY2 = GetFloat(nextMap, "mixShearY", 1);
 						float mixRotate2 = GetFloat(nextMap, "mixRotate", 1), mixShearY2 = GetFloat(nextMap, "mixShearY", 1);
 						float mixX2 = GetFloat(nextMap, "mixX", 1), mixY2 = GetFloat(nextMap, "mixY", mixX2);
 						float mixX2 = GetFloat(nextMap, "mixX", 1), mixY2 = GetFloat(nextMap, "mixY", mixX2);
@@ -915,14 +915,14 @@ namespace Spine {
 					PathConstraintData constraint = skeletonData.FindPathConstraint(constraintMap.Key);
 					PathConstraintData constraint = skeletonData.FindPathConstraint(constraintMap.Key);
 					if (constraint == null) throw new Exception("Path constraint not found: " + constraintMap.Key);
 					if (constraint == null) throw new Exception("Path constraint not found: " + constraintMap.Key);
 					int constraintIndex = skeletonData.pathConstraints.IndexOf(constraint);
 					int constraintIndex = skeletonData.pathConstraints.IndexOf(constraint);
-					var timelineMap = (Dictionary<string, Object>)constraintMap.Value;
+					Dictionary<string, object> timelineMap = (Dictionary<string, Object>)constraintMap.Value;
 					foreach (KeyValuePair<string, Object> timelineEntry in timelineMap) {
 					foreach (KeyValuePair<string, Object> timelineEntry in timelineMap) {
-						var values = (List<Object>)timelineEntry.Value;
-						var keyMapEnumerator = values.GetEnumerator();
+						List<object> values = (List<Object>)timelineEntry.Value;
+						List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 						if (!keyMapEnumerator.MoveNext()) continue;
 						if (!keyMapEnumerator.MoveNext()) continue;
 
 
 						int frames = values.Count;
 						int frames = values.Count;
-						var timelineName = (string)timelineEntry.Key;
+						string timelineName = (string)timelineEntry.Key;
 						if (timelineName == "position") {
 						if (timelineName == "position") {
 							CurveTimeline1 timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);
 							CurveTimeline1 timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, timeline, 0, constraint.positionMode == PositionMode.Fixed ? scale : 1));
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, timeline, 0, constraint.positionMode == PositionMode.Fixed ? scale : 1));
@@ -932,7 +932,7 @@ namespace Spine {
 								constraint.spacingMode == SpacingMode.Length || constraint.spacingMode == SpacingMode.Fixed ? scale : 1));
 								constraint.spacingMode == SpacingMode.Length || constraint.spacingMode == SpacingMode.Fixed ? scale : 1));
 						} else if (timelineName == "mix") {
 						} else if (timelineName == "mix") {
 							PathConstraintMixTimeline timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);
 							PathConstraintMixTimeline timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							float time = GetFloat(keyMap, "time", 0);
 							float mixRotate = GetFloat(keyMap, "mixRotate", 1);
 							float mixRotate = GetFloat(keyMap, "mixRotate", 1);
 							float mixX = GetFloat(keyMap, "mixX", 1), mixY = GetFloat(keyMap, "mixY", mixX);
 							float mixX = GetFloat(keyMap, "mixX", 1), mixY = GetFloat(keyMap, "mixY", mixX);
@@ -942,7 +942,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									timeline.Shrink(bezier);
 									break;
 									break;
 								}
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 								float time2 = GetFloat(nextMap, "time", 0);
 								float time2 = GetFloat(nextMap, "time", 0);
 								float mixRotate2 = GetFloat(nextMap, "mixRotate", 1);
 								float mixRotate2 = GetFloat(nextMap, "mixRotate", 1);
 								float mixX2 = GetFloat(nextMap, "mixX", 1), mixY2 = GetFloat(nextMap, "mixY", mixX2);
 								float mixX2 = GetFloat(nextMap, "mixX", 1), mixY2 = GetFloat(nextMap, "mixY", mixX2);
@@ -975,10 +975,10 @@ namespace Spine {
 							Attachment attachment = skin.GetAttachment(slot.index, attachmentMap.Key);
 							Attachment attachment = skin.GetAttachment(slot.index, attachmentMap.Key);
 							if (attachment == null) throw new Exception("Timeline attachment not found: " + attachmentMap.Key);
 							if (attachment == null) throw new Exception("Timeline attachment not found: " + attachmentMap.Key);
 							foreach (KeyValuePair<string, Object> timelineMap in (Dictionary<string, Object>)attachmentMap.Value) {
 							foreach (KeyValuePair<string, Object> timelineMap in (Dictionary<string, Object>)attachmentMap.Value) {
-								var values = (List<Object>)timelineMap.Value;
-								var keyMapEnumerator = values.GetEnumerator();
+								List<object> values = (List<Object>)timelineMap.Value;
+								List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 								if (!keyMapEnumerator.MoveNext()) continue;
 								if (!keyMapEnumerator.MoveNext()) continue;
-								var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 								int frames = values.Count;
 								int frames = values.Count;
 								string timelineName = timelineMap.Key;
 								string timelineName = timelineMap.Key;
 								if (timelineName == "deform") {
 								if (timelineName == "deform") {
@@ -1014,7 +1014,7 @@ namespace Spine {
 											timeline.Shrink(bezier);
 											timeline.Shrink(bezier);
 											break;
 											break;
 										}
 										}
-										var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+										Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 										float time2 = GetFloat(nextMap, "time", 0);
 										float time2 = GetFloat(nextMap, "time", 0);
 										if (keyMap.ContainsKey("curve")) {
 										if (keyMap.ContainsKey("curve")) {
 											object curve = keyMap["curve"];
 											object curve = keyMap["curve"];
@@ -1047,8 +1047,8 @@ namespace Spine {
 
 
 			// Draw order timeline.
 			// Draw order timeline.
 			if (map.ContainsKey("drawOrder")) {
 			if (map.ContainsKey("drawOrder")) {
-				var values = (List<Object>)map["drawOrder"];
-				var timeline = new DrawOrderTimeline(values.Count);
+				List<object> values = (List<Object>)map["drawOrder"];
+				DrawOrderTimeline timeline = new DrawOrderTimeline(values.Count);
 				int slotCount = skeletonData.slots.Count;
 				int slotCount = skeletonData.slots.Count;
 				int frame = 0;
 				int frame = 0;
 				foreach (Dictionary<string, Object> drawOrderMap in values) {
 				foreach (Dictionary<string, Object> drawOrderMap in values) {
@@ -1057,7 +1057,7 @@ namespace Spine {
 						drawOrder = new int[slotCount];
 						drawOrder = new int[slotCount];
 						for (int i = slotCount - 1; i >= 0; i--)
 						for (int i = slotCount - 1; i >= 0; i--)
 							drawOrder[i] = -1;
 							drawOrder[i] = -1;
-						var offsets = (List<Object>)drawOrderMap["offsets"];
+						List<object> offsets = (List<Object>)drawOrderMap["offsets"];
 						int[] unchanged = new int[slotCount - offsets.Count];
 						int[] unchanged = new int[slotCount - offsets.Count];
 						int originalIndex = 0, unchangedIndex = 0;
 						int originalIndex = 0, unchangedIndex = 0;
 						foreach (Dictionary<string, Object> offsetMap in offsets) {
 						foreach (Dictionary<string, Object> offsetMap in offsets) {
@@ -1084,13 +1084,13 @@ namespace Spine {
 
 
 			// Event timeline.
 			// Event timeline.
 			if (map.ContainsKey("events")) {
 			if (map.ContainsKey("events")) {
-				var eventsMap = (List<Object>)map["events"];
-				var timeline = new EventTimeline(eventsMap.Count);
+				List<object> eventsMap = (List<Object>)map["events"];
+				EventTimeline timeline = new EventTimeline(eventsMap.Count);
 				int frame = 0;
 				int frame = 0;
 				foreach (Dictionary<string, Object> eventMap in eventsMap) {
 				foreach (Dictionary<string, Object> eventMap in eventsMap) {
 					EventData eventData = skeletonData.FindEvent((string)eventMap["name"]);
 					EventData eventData = skeletonData.FindEvent((string)eventMap["name"]);
 					if (eventData == null) throw new Exception("Event not found: " + eventMap["name"]);
 					if (eventData == null) throw new Exception("Event not found: " + eventMap["name"]);
-					var e = new Event(GetFloat(eventMap, "time", 0), eventData) {
+					Event e = new Event(GetFloat(eventMap, "time", 0), eventData) {
 						intValue = GetInt(eventMap, "int", eventData.Int),
 						intValue = GetInt(eventMap, "int", eventData.Int),
 						floatValue = GetFloat(eventMap, "float", eventData.Float),
 						floatValue = GetFloat(eventMap, "float", eventData.Float),
 						stringValue = GetString(eventMap, "string", eventData.String)
 						stringValue = GetString(eventMap, "string", eventData.String)
@@ -1106,14 +1106,14 @@ namespace Spine {
 			}
 			}
 			timelines.TrimExcess();
 			timelines.TrimExcess();
 			float duration = 0;
 			float duration = 0;
-			var items = timelines.Items;
+			Timeline[] items = timelines.Items;
 			for (int i = 0, n = timelines.Count; i < n; i++)
 			for (int i = 0, n = timelines.Count; i < n; i++)
 				duration = Math.Max(duration, items[i].Duration);
 				duration = Math.Max(duration, items[i].Duration);
 			skeletonData.animations.Add(new Animation(name, timelines, duration));
 			skeletonData.animations.Add(new Animation(name, timelines, duration));
 		}
 		}
 
 
 		static Timeline ReadTimeline (ref List<object>.Enumerator keyMapEnumerator, CurveTimeline1 timeline, float defaultValue, float scale) {
 		static Timeline ReadTimeline (ref List<object>.Enumerator keyMapEnumerator, CurveTimeline1 timeline, float defaultValue, float scale) {
-			var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+			Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 			float time = GetFloat(keyMap, "time", 0);
 			float time = GetFloat(keyMap, "time", 0);
 			float value = GetFloat(keyMap, "value", defaultValue) * scale;
 			float value = GetFloat(keyMap, "value", defaultValue) * scale;
 			for (int frame = 0, bezier = 0; ; frame++) {
 			for (int frame = 0, bezier = 0; ; frame++) {
@@ -1122,7 +1122,7 @@ namespace Spine {
 					timeline.Shrink(bezier);
 					timeline.Shrink(bezier);
 					return timeline;
 					return timeline;
 				}
 				}
-				var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+				Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 				float time2 = GetFloat(nextMap, "time", 0);
 				float time2 = GetFloat(nextMap, "time", 0);
 				float value2 = GetFloat(nextMap, "value", defaultValue) * scale;
 				float value2 = GetFloat(nextMap, "value", defaultValue) * scale;
 				if (keyMap.ContainsKey("curve")) {
 				if (keyMap.ContainsKey("curve")) {
@@ -1138,7 +1138,7 @@ namespace Spine {
 		static Timeline ReadTimeline (ref List<object>.Enumerator keyMapEnumerator, CurveTimeline2 timeline, String name1, String name2, float defaultValue,
 		static Timeline ReadTimeline (ref List<object>.Enumerator keyMapEnumerator, CurveTimeline2 timeline, String name1, String name2, float defaultValue,
 			float scale) {
 			float scale) {
 
 
-			var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+			Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 			float time = GetFloat(keyMap, "time", 0);
 			float time = GetFloat(keyMap, "time", 0);
 			float value1 = GetFloat(keyMap, name1, defaultValue) * scale, value2 = GetFloat(keyMap, name2, defaultValue) * scale;
 			float value1 = GetFloat(keyMap, name1, defaultValue) * scale, value2 = GetFloat(keyMap, name2, defaultValue) * scale;
 			for (int frame = 0, bezier = 0; ; frame++) {
 			for (int frame = 0, bezier = 0; ; frame++) {
@@ -1147,7 +1147,7 @@ namespace Spine {
 					timeline.Shrink(bezier);
 					timeline.Shrink(bezier);
 					return timeline;
 					return timeline;
 				}
 				}
-				var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+				Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 				float time2 = GetFloat(nextMap, "time", 0);
 				float time2 = GetFloat(nextMap, "time", 0);
 				float nvalue1 = GetFloat(nextMap, name1, defaultValue) * scale, nvalue2 = GetFloat(nextMap, name2, defaultValue) * scale;
 				float nvalue1 = GetFloat(nextMap, name1, defaultValue) * scale, nvalue2 = GetFloat(nextMap, name2, defaultValue) * scale;
 				if (keyMap.ContainsKey("curve")) {
 				if (keyMap.ContainsKey("curve")) {
@@ -1170,7 +1170,7 @@ namespace Spine {
 				if (curveString == "stepped") timeline.SetStepped(frame);
 				if (curveString == "stepped") timeline.SetStepped(frame);
 				return bezier;
 				return bezier;
 			}
 			}
-			var curveValues = (List<object>)curve;
+			List<object> curveValues = (List<object>)curve;
 			int i = value << 2;
 			int i = value << 2;
 			float cx1 = (float)curveValues[i];
 			float cx1 = (float)curveValues[i];
 			float cy1 = (float)curveValues[i + 1] * scale;
 			float cy1 = (float)curveValues[i + 1] * scale;
@@ -1186,8 +1186,8 @@ namespace Spine {
 		}
 		}
 
 
 		static float[] GetFloatArray (Dictionary<string, Object> map, string name, float scale) {
 		static float[] GetFloatArray (Dictionary<string, Object> map, string name, float scale) {
-			var list = (List<Object>)map[name];
-			var values = new float[list.Count];
+			List<object> list = (List<Object>)map[name];
+			float[] values = new float[list.Count];
 			if (scale == 1) {
 			if (scale == 1) {
 				for (int i = 0, n = list.Count; i < n; i++)
 				for (int i = 0, n = list.Count; i < n; i++)
 					values[i] = (float)list[i];
 					values[i] = (float)list[i];
@@ -1199,8 +1199,8 @@ namespace Spine {
 		}
 		}
 
 
 		static int[] GetIntArray (Dictionary<string, Object> map, string name) {
 		static int[] GetIntArray (Dictionary<string, Object> map, string name) {
-			var list = (List<Object>)map[name];
-			var values = new int[list.Count];
+			List<object> list = (List<Object>)map[name];
+			int[] values = new int[list.Count];
 			for (int i = 0, n = list.Count; i < n; i++)
 			for (int i = 0, n = list.Count; i < n; i++)
 				values[i] = (int)(float)list[i];
 				values[i] = (int)(float)list[i];
 			return values;
 			return values;

+ 4 - 4
spine-csharp/src/Skin.cs

@@ -70,7 +70,7 @@ namespace Spine {
 			foreach (ConstraintData data in skin.constraints)
 			foreach (ConstraintData data in skin.constraints)
 				if (!constraints.Contains(data)) constraints.Add(data);
 				if (!constraints.Contains(data)) constraints.Add(data);
 
 
-			foreach (var item in skin.attachments) {
+			foreach (KeyValuePair<SkinKey, SkinEntry> item in skin.attachments) {
 				SkinEntry entry = item.Value;
 				SkinEntry entry = item.Value;
 				SetAttachment(entry.slotIndex, entry.name, entry.attachment);
 				SetAttachment(entry.slotIndex, entry.name, entry.attachment);
 			}
 			}
@@ -84,7 +84,7 @@ namespace Spine {
 			foreach (ConstraintData data in skin.constraints)
 			foreach (ConstraintData data in skin.constraints)
 				if (!constraints.Contains(data)) constraints.Add(data);
 				if (!constraints.Contains(data)) constraints.Add(data);
 
 
-			foreach (var item in skin.attachments) {
+			foreach (KeyValuePair<SkinKey, SkinEntry> item in skin.attachments) {
 				SkinEntry entry = item.Value;
 				SkinEntry entry = item.Value;
 				if (entry.attachment is MeshAttachment) {
 				if (entry.attachment is MeshAttachment) {
 					SetAttachment(entry.slotIndex, entry.name,
 					SetAttachment(entry.slotIndex, entry.name,
@@ -112,7 +112,7 @@ namespace Spine {
 		public void GetAttachments (int slotIndex, List<SkinEntry> attachments) {
 		public void GetAttachments (int slotIndex, List<SkinEntry> attachments) {
 			if (slotIndex < 0) throw new ArgumentException("slotIndex must be >= 0.");
 			if (slotIndex < 0) throw new ArgumentException("slotIndex must be >= 0.");
 			if (attachments == null) throw new ArgumentNullException("attachments", "attachments cannot be null.");
 			if (attachments == null) throw new ArgumentNullException("attachments", "attachments cannot be null.");
-			foreach (var item in this.attachments) {
+			foreach (KeyValuePair<SkinKey, SkinEntry> item in this.attachments) {
 				SkinEntry entry = item.Value;
 				SkinEntry entry = item.Value;
 				if (entry.slotIndex == slotIndex) attachments.Add(entry);
 				if (entry.slotIndex == slotIndex) attachments.Add(entry);
 			}
 			}
@@ -132,7 +132,7 @@ namespace Spine {
 		/// <summary>Attach all attachments from this skin if the corresponding attachment from the old skin is currently attached.</summary>
 		/// <summary>Attach all attachments from this skin if the corresponding attachment from the old skin is currently attached.</summary>
 		internal void AttachAll (Skeleton skeleton, Skin oldSkin) {
 		internal void AttachAll (Skeleton skeleton, Skin oldSkin) {
 			Slot[] slots = skeleton.slots.Items;
 			Slot[] slots = skeleton.slots.Items;
-			foreach (var item in oldSkin.attachments) {
+			foreach (KeyValuePair<SkinKey, SkinEntry> item in oldSkin.attachments) {
 				SkinEntry entry = item.Value;
 				SkinEntry entry = item.Value;
 				int slotIndex = entry.slotIndex;
 				int slotIndex = entry.slotIndex;
 				Slot slot = slots[slotIndex];
 				Slot slot = slots[slotIndex];

+ 4 - 4
spine-csharp/src/TransformConstraint.cs

@@ -104,7 +104,7 @@ namespace Spine {
 			float degRadReflect = ta * td - tb * tc > 0 ? MathUtils.DegRad : -MathUtils.DegRad;
 			float degRadReflect = ta * td - tb * tc > 0 ? MathUtils.DegRad : -MathUtils.DegRad;
 			float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
 			float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
 
 
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 				Bone bone = bones[i];
 				Bone bone = bones[i];
 
 
@@ -171,7 +171,7 @@ namespace Spine {
 			float degRadReflect = ta * td - tb * tc > 0 ? MathUtils.DegRad : -MathUtils.DegRad;
 			float degRadReflect = ta * td - tb * tc > 0 ? MathUtils.DegRad : -MathUtils.DegRad;
 			float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
 			float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
 
 
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 				Bone bone = bones[i];
 				Bone bone = bones[i];
 
 
@@ -231,7 +231,7 @@ namespace Spine {
 
 
 			Bone target = this.target;
 			Bone target = this.target;
 
 
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 				Bone bone = bones[i];
 				Bone bone = bones[i];
 
 
@@ -269,7 +269,7 @@ namespace Spine {
 
 
 			Bone target = this.target;
 			Bone target = this.target;
 
 
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 			for (int i = 0, n = this.bones.Count; i < n; i++) {
 				Bone bone = bones[i];
 				Bone bone = bones[i];
 
 

+ 12 - 12
spine-csharp/src/Triangulator.cs

@@ -42,21 +42,21 @@ namespace Spine {
 		private readonly Pool<ExposedList<int>> polygonIndicesPool = new Pool<ExposedList<int>>();
 		private readonly Pool<ExposedList<int>> polygonIndicesPool = new Pool<ExposedList<int>>();
 
 
 		public ExposedList<int> Triangulate (ExposedList<float> verticesArray) {
 		public ExposedList<int> Triangulate (ExposedList<float> verticesArray) {
-			var vertices = verticesArray.Items;
+			float[] vertices = verticesArray.Items;
 			int vertexCount = verticesArray.Count >> 1;
 			int vertexCount = verticesArray.Count >> 1;
 
 
-			var indicesArray = this.indicesArray;
+			ExposedList<int> indicesArray = this.indicesArray;
 			indicesArray.Clear();
 			indicesArray.Clear();
 			int[] indices = indicesArray.Resize(vertexCount).Items;
 			int[] indices = indicesArray.Resize(vertexCount).Items;
 			for (int i = 0; i < vertexCount; i++)
 			for (int i = 0; i < vertexCount; i++)
 				indices[i] = i;
 				indices[i] = i;
 
 
-			var isConcaveArray = this.isConcaveArray;
+			ExposedList<bool> isConcaveArray = this.isConcaveArray;
 			bool[] isConcave = isConcaveArray.Resize(vertexCount).Items;
 			bool[] isConcave = isConcaveArray.Resize(vertexCount).Items;
 			for (int i = 0, n = vertexCount; i < n; ++i)
 			for (int i = 0, n = vertexCount; i < n; ++i)
 				isConcave[i] = IsConcave(i, vertexCount, vertices, indices);
 				isConcave[i] = IsConcave(i, vertexCount, vertices, indices);
 
 
-			var triangles = this.triangles;
+			ExposedList<int> triangles = this.triangles;
 			triangles.Clear();
 			triangles.Clear();
 			triangles.EnsureCapacity(Math.Max(0, vertexCount - 2) << 2);
 			triangles.EnsureCapacity(Math.Max(0, vertexCount - 2) << 2);
 
 
@@ -122,21 +122,21 @@ namespace Spine {
 		}
 		}
 
 
 		public ExposedList<ExposedList<float>> Decompose (ExposedList<float> verticesArray, ExposedList<int> triangles) {
 		public ExposedList<ExposedList<float>> Decompose (ExposedList<float> verticesArray, ExposedList<int> triangles) {
-			var vertices = verticesArray.Items;
-			var convexPolygons = this.convexPolygons;
+			float[] vertices = verticesArray.Items;
+			ExposedList<ExposedList<float>> convexPolygons = this.convexPolygons;
 			for (int i = 0, n = convexPolygons.Count; i < n; i++)
 			for (int i = 0, n = convexPolygons.Count; i < n; i++)
 				polygonPool.Free(convexPolygons.Items[i]);
 				polygonPool.Free(convexPolygons.Items[i]);
 			convexPolygons.Clear();
 			convexPolygons.Clear();
 
 
-			var convexPolygonsIndices = this.convexPolygonsIndices;
+			ExposedList<ExposedList<int>> convexPolygonsIndices = this.convexPolygonsIndices;
 			for (int i = 0, n = convexPolygonsIndices.Count; i < n; i++)
 			for (int i = 0, n = convexPolygonsIndices.Count; i < n; i++)
 				polygonIndicesPool.Free(convexPolygonsIndices.Items[i]);
 				polygonIndicesPool.Free(convexPolygonsIndices.Items[i]);
 			convexPolygonsIndices.Clear();
 			convexPolygonsIndices.Clear();
 
 
-			var polygonIndices = polygonIndicesPool.Obtain();
+			ExposedList<int> polygonIndices = polygonIndicesPool.Obtain();
 			polygonIndices.Clear();
 			polygonIndices.Clear();
 
 
-			var polygon = polygonPool.Obtain();
+			ExposedList<float> polygon = polygonPool.Obtain();
 			polygon.Clear();
 			polygon.Clear();
 
 
 			// Merge subsequent triangles if they form a triangle fan.
 			// Merge subsequent triangles if they form a triangle fan.
@@ -149,7 +149,7 @@ namespace Spine {
 				float x3 = vertices[t3], y3 = vertices[t3 + 1];
 				float x3 = vertices[t3], y3 = vertices[t3 + 1];
 
 
 				// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).
 				// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).
-				var merged = false;
+				bool merged = false;
 				if (fanBaseIndex == t1) {
 				if (fanBaseIndex == t1) {
 					int o = polygon.Count - 4;
 					int o = polygon.Count - 4;
 					float[] p = polygon.Items;
 					float[] p = polygon.Items;
@@ -213,13 +213,13 @@ namespace Spine {
 
 
 				for (int ii = 0; ii < n; ii++) {
 				for (int ii = 0; ii < n; ii++) {
 					if (ii == i) continue;
 					if (ii == i) continue;
-					var otherIndices = convexPolygonsIndices.Items[ii];
+					ExposedList<int> otherIndices = convexPolygonsIndices.Items[ii];
 					if (otherIndices.Count != 3) continue;
 					if (otherIndices.Count != 3) continue;
 					int otherFirstIndex = otherIndices.Items[0];
 					int otherFirstIndex = otherIndices.Items[0];
 					int otherSecondIndex = otherIndices.Items[1];
 					int otherSecondIndex = otherIndices.Items[1];
 					int otherLastIndex = otherIndices.Items[2];
 					int otherLastIndex = otherIndices.Items[2];
 
 
-					var otherPoly = convexPolygons.Items[ii];
+					ExposedList<float> otherPoly = convexPolygons.Items[ii];
 					float x3 = otherPoly.Items[otherPoly.Count - 2], y3 = otherPoly.Items[otherPoly.Count - 1];
 					float x3 = otherPoly.Items[otherPoly.Count - 2], y3 = otherPoly.Items[otherPoly.Count - 1];
 
 
 					if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;
 					if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;

+ 1 - 1
spine-csharp/tests/src/AnimationStateTests.cs

@@ -821,7 +821,7 @@ namespace Spine {
 				Expect(1, "dispose", 1, 2.1f) //
 				Expect(1, "dispose", 1, 2.1f) //
 			);
 			);
 			state.SetAnimation(0, "events0", false);
 			state.SetAnimation(0, "events0", false);
-			var entry1 = state.AddAnimation(0, "events1", false, 0);
+			TrackEntry entry1 = state.AddAnimation(0, "events1", false, 0);
 			entry1.MixDuration = 0.25f;
 			entry1.MixDuration = 0.25f;
 			entry1.TrackEnd = 1.0f;
 			entry1.TrackEnd = 1.0f;
 			Run(0.1f, 1000, null);
 			Run(0.1f, 1000, null);

+ 4 - 4
spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/SpineAnimationTesterTool.cs

@@ -88,7 +88,7 @@ namespace Spine.Unity.Examples {
 
 
 			// Fill in the control list.
 			// Fill in the control list.
 			if (boundAnimationsText != null) {
 			if (boundAnimationsText != null) {
-				var boundAnimationsStringBuilder = new StringBuilder();
+				StringBuilder boundAnimationsStringBuilder = new StringBuilder();
 				boundAnimationsStringBuilder.AppendLine("Animation Controls:");
 				boundAnimationsStringBuilder.AppendLine("Animation Controls:");
 
 
 				for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
 				for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
@@ -97,7 +97,7 @@ namespace Spine.Unity.Examples {
 						boundAnimationsStringBuilder.AppendLine();
 						boundAnimationsStringBuilder.AppendLine();
 
 
 					boundAnimationsStringBuilder.AppendFormat("---- Track {0} ---- \n", trackIndex);
 					boundAnimationsStringBuilder.AppendFormat("---- Track {0} ---- \n", trackIndex);
-					foreach (var ba in trackControls[trackIndex].controls) {
+					foreach (AnimationControl ba in trackControls[trackIndex].controls) {
 						string animationName = ba.animationName;
 						string animationName = ba.animationName;
 						if (string.IsNullOrEmpty(animationName))
 						if (string.IsNullOrEmpty(animationName))
 							animationName = "SetEmptyAnimation";
 							animationName = "SetEmptyAnimation";
@@ -120,13 +120,13 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void Update () {
 		void Update () {
-			var animationState = skeletonAnimation.AnimationState;
+			AnimationState animationState = skeletonAnimation.AnimationState;
 
 
 			// For each track
 			// For each track
 			for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
 			for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
 
 
 				// For each control in the track
 				// For each control in the track
-				foreach (var control in trackControls[trackIndex].controls) {
+				foreach (AnimationControl control in trackControls[trackIndex].controls) {
 
 
 					// Check each control, and play the appropriate animation.
 					// Check each control, and play the appropriate animation.
 					if (Input.GetKeyDown(control.key)) {
 					if (Input.GetKeyDown(control.key)) {

+ 2 - 1
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineBlinkPlayer.cs

@@ -40,7 +40,8 @@ namespace Spine.Unity.Examples {
 		public float maximumDelay = 3f;
 		public float maximumDelay = 3f;
 
 
 		IEnumerator Start () {
 		IEnumerator Start () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>(); if (skeletonAnimation == null) yield break;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			if (skeletonAnimation == null) yield break;
 			while (true) {
 			while (true) {
 				skeletonAnimation.AnimationState.SetAnimation(SpineBlinkPlayer.BlinkTrack, blinkAnimation, false);
 				skeletonAnimation.AnimationState.SetAnimation(SpineBlinkPlayer.BlinkTrack, blinkAnimation, false);
 				yield return new WaitForSeconds(Random.Range(minimumDelay, maximumDelay));
 				yield return new WaitForSeconds(Random.Range(minimumDelay, maximumDelay));

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerModel.cs

@@ -94,7 +94,7 @@ namespace Spine.Unity.Examples {
 
 
 			// Fake jumping.
 			// Fake jumping.
 			{
 			{
-				var pos = transform.localPosition;
+				Vector3 pos = transform.localPosition;
 				const float jumpTime = 1.2f;
 				const float jumpTime = 1.2f;
 				const float half = jumpTime * 0.5f;
 				const float half = jumpTime * 0.5f;
 				const float jumpPower = 20f;
 				const float jumpPower = 20f;

+ 6 - 6
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs

@@ -75,7 +75,7 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			// Detect changes in model.state
 			// Detect changes in model.state
-			var currentModelState = model.state;
+			SpineBeginnerBodyState currentModelState = model.state;
 
 
 			if (previousViewState != currentModelState) {
 			if (previousViewState != currentModelState) {
 				PlayNewStableAnimation();
 				PlayNewStableAnimation();
@@ -85,7 +85,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void PlayNewStableAnimation () {
 		void PlayNewStableAnimation () {
-			var newModelState = model.state;
+			SpineBeginnerBodyState newModelState = model.state;
 			Animation nextAnimation;
 			Animation nextAnimation;
 
 
 			// Add conditionals to not interrupt transient animations.
 			// Add conditionals to not interrupt transient animations.
@@ -115,7 +115,7 @@ namespace Spine.Unity.Examples {
 
 
 		[ContextMenu("Check Tracks")]
 		[ContextMenu("Check Tracks")]
 		void CheckTracks () {
 		void CheckTracks () {
-			var state = skeletonAnimation.AnimationState;
+			AnimationState state = skeletonAnimation.AnimationState;
 			Debug.Log(state.GetCurrent(0));
 			Debug.Log(state.GetCurrent(0));
 			Debug.Log(state.GetCurrent(1));
 			Debug.Log(state.GetCurrent(1));
 		}
 		}
@@ -123,13 +123,13 @@ namespace Spine.Unity.Examples {
 		#region Transient Actions
 		#region Transient Actions
 		public void PlayShoot () {
 		public void PlayShoot () {
 			// Play the shoot animation on track 1.
 			// Play the shoot animation on track 1.
-			var shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
+			TrackEntry shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
 			shootTrack.AttachmentThreshold = 1f;
 			shootTrack.AttachmentThreshold = 1f;
 			shootTrack.MixDuration = 0f;
 			shootTrack.MixDuration = 0f;
 			skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
 			skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
 
 
 			// Play the aim animation on track 2 to aim at the mouse target.
 			// Play the aim animation on track 2 to aim at the mouse target.
-			var aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false);
+			TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false);
 			aimTrack.AttachmentThreshold = 1f;
 			aimTrack.AttachmentThreshold = 1f;
 			aimTrack.MixDuration = 0f;
 			aimTrack.MixDuration = 0f;
 			skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
 			skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
@@ -142,7 +142,7 @@ namespace Spine.Unity.Examples {
 
 
 		public void StartPlayingAim () {
 		public void StartPlayingAim () {
 			// Play the aim animation on track 2 to aim at the mouse target.
 			// Play the aim animation on track 2 to aim at the mouse target.
-			var aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true);
+			TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true);
 			aimTrack.AttachmentThreshold = 1f;
 			aimTrack.AttachmentThreshold = 1f;
 			aimTrack.MixDuration = 0f;
 			aimTrack.MixDuration = 0f;
 		}
 		}

+ 3 - 3
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyTargetController.cs

@@ -49,9 +49,9 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void Update () {
 		void Update () {
-			var mousePosition = Input.mousePosition;
-			var worldMousePosition = cam.ScreenToWorldPoint(mousePosition);
-			var skeletonSpacePoint = skeletonAnimation.transform.InverseTransformPoint(worldMousePosition);
+			Vector3 mousePosition = Input.mousePosition;
+			Vector3 worldMousePosition = cam.ScreenToWorldPoint(mousePosition);
+			Vector3 skeletonSpacePoint = skeletonAnimation.transform.InverseTransformPoint(worldMousePosition);
 			skeletonSpacePoint.x *= skeletonAnimation.Skeleton.ScaleX;
 			skeletonSpacePoint.x *= skeletonAnimation.Skeleton.ScaleX;
 			skeletonSpacePoint.y *= skeletonAnimation.Skeleton.ScaleY;
 			skeletonSpacePoint.y *= skeletonAnimation.Skeleton.ScaleY;
 			bone.SetLocalPosition(skeletonSpacePoint);
 			bone.SetLocalPosition(skeletonSpacePoint);

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/TransitionDictionaryExample.cs

@@ -50,7 +50,7 @@ namespace Spine.Unity.Examples {
 
 
 		void Start () {
 		void Start () {
 			dictionary.Clear();
 			dictionary.Clear();
-			foreach (var e in transitions) {
+			foreach (SerializedEntry e in transitions) {
 				dictionary.Add(new AnimationStateData.AnimationPair(e.from.Animation, e.to.Animation), e.transition.Animation);
 				dictionary.Add(new AnimationStateData.AnimationPair(e.from.Animation, e.to.Animation), e.transition.Animation);
 			}
 			}
 		}
 		}

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/HurtFlashEffect.cs

@@ -58,7 +58,7 @@ public class HurtFlashEffect : MonoBehaviour {
 		int fillPhase = Shader.PropertyToID(fillPhaseProperty);
 		int fillPhase = Shader.PropertyToID(fillPhaseProperty);
 		int fillColor = Shader.PropertyToID(fillColorProperty);
 		int fillColor = Shader.PropertyToID(fillColorProperty);
 
 
-		var wait = new WaitForSeconds(interval);
+		WaitForSeconds wait = new WaitForSeconds(interval);
 
 
 		for (int i = 0; i < flashCount; i++) {
 		for (int i = 0; i < flashCount; i++) {
 			mpb.SetColor(fillColor, flashColor);
 			mpb.SetColor(fillColor, flashColor);

+ 9 - 9
spine-unity/Assets/Spine Examples/Scripts/Mecanim as Logic/SkeletonAnimationHandleExample.cs

@@ -61,17 +61,17 @@ namespace Spine.Unity.Examples {
 
 
 		void Awake () {
 		void Awake () {
 			// Initialize AnimationReferenceAssets
 			// Initialize AnimationReferenceAssets
-			foreach (var entry in statesAndAnimations) {
+			foreach (StateNameToAnimationReference entry in statesAndAnimations) {
 				entry.animation.Initialize();
 				entry.animation.Initialize();
 			}
 			}
-			foreach (var entry in transitions) {
+			foreach (AnimationTransition entry in transitions) {
 				entry.from.Initialize();
 				entry.from.Initialize();
 				entry.to.Initialize();
 				entry.to.Initialize();
 				entry.transition.Initialize();
 				entry.transition.Initialize();
 			}
 			}
 
 
 			// Build Dictionary
 			// Build Dictionary
-			//foreach (var entry in transitions) {
+			//foreach (AnimationTransition entry in transitions) {
 			//	transitionDictionary.Add(new AnimationStateData.AnimationPair(entry.from.Animation, entry.to.Animation), entry.transition.Animation);
 			//	transitionDictionary.Add(new AnimationStateData.AnimationPair(entry.from.Animation, entry.to.Animation), entry.transition.Animation);
 			//}
 			//}
 		}
 		}
@@ -90,7 +90,7 @@ namespace Spine.Unity.Examples {
 
 
 		/// <summary>Plays an animation based on the hash of the state name.</summary>
 		/// <summary>Plays an animation based on the hash of the state name.</summary>
 		public void PlayAnimationForState (int shortNameHash, int layerIndex) {
 		public void PlayAnimationForState (int shortNameHash, int layerIndex) {
-			var foundAnimation = GetAnimationForState(shortNameHash);
+			Animation foundAnimation = GetAnimationForState(shortNameHash);
 			if (foundAnimation == null)
 			if (foundAnimation == null)
 				return;
 				return;
 
 
@@ -104,7 +104,7 @@ namespace Spine.Unity.Examples {
 
 
 		/// <summary>Gets a Spine Animation based on the hash of the state name.</summary>
 		/// <summary>Gets a Spine Animation based on the hash of the state name.</summary>
 		public Spine.Animation GetAnimationForState (int shortNameHash) {
 		public Spine.Animation GetAnimationForState (int shortNameHash) {
-			var foundState = statesAndAnimations.Find(entry => StringToHash(entry.stateName) == shortNameHash);
+			StateNameToAnimationReference foundState = statesAndAnimations.Find(entry => StringToHash(entry.stateName) == shortNameHash);
 			return (foundState == null) ? null : foundState.animation;
 			return (foundState == null) ? null : foundState.animation;
 		}
 		}
 
 
@@ -129,10 +129,10 @@ namespace Spine.Unity.Examples {
 
 
 		/// <summary>Play a non-looping animation once then continue playing the state animation.</summary>
 		/// <summary>Play a non-looping animation once then continue playing the state animation.</summary>
 		public void PlayOneShot (Spine.Animation oneShot, int layerIndex) {
 		public void PlayOneShot (Spine.Animation oneShot, int layerIndex) {
-			var state = skeletonAnimation.AnimationState;
+			AnimationState state = skeletonAnimation.AnimationState;
 			state.SetAnimation(0, oneShot, false);
 			state.SetAnimation(0, oneShot, false);
 
 
-			var transition = TryGetTransition(oneShot, TargetAnimation);
+			Animation transition = TryGetTransition(oneShot, TargetAnimation);
 			if (transition != null)
 			if (transition != null)
 				state.AddAnimation(0, transition, false, 0f);
 				state.AddAnimation(0, transition, false, 0f);
 
 
@@ -140,7 +140,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		Spine.Animation TryGetTransition (Spine.Animation from, Spine.Animation to) {
 		Spine.Animation TryGetTransition (Spine.Animation from, Spine.Animation to) {
-			foreach (var transition in transitions) {
+			foreach (AnimationTransition transition in transitions) {
 				if (transition.from.Animation == from && transition.to.Animation == to) {
 				if (transition.from.Animation == from && transition.to.Animation == to) {
 					return transition.transition.Animation;
 					return transition.transition.Animation;
 				}
 				}
@@ -153,7 +153,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		Spine.Animation GetCurrentAnimation (int layerIndex) {
 		Spine.Animation GetCurrentAnimation (int layerIndex) {
-			var currentTrackEntry = skeletonAnimation.AnimationState.GetCurrent(layerIndex);
+			TrackEntry currentTrackEntry = skeletonAnimation.AnimationState.GetCurrent(layerIndex);
 			return (currentTrackEntry != null) ? currentTrackEntry.Animation : null;
 			return (currentTrackEntry != null) ? currentTrackEntry.Animation : null;
 		}
 		}
 
 

+ 30 - 30
spine-unity/Assets/Spine Examples/Scripts/MecanimAnimationMatchModifier/AnimationMatchModifierAsset.cs

@@ -60,9 +60,9 @@ namespace Spine.Unity.Examples {
 
 
 				// Build a reference collection of timelines to match
 				// Build a reference collection of timelines to match
 				// and a collection of dummy timelines that can be used to fill-in missing items.
 				// and a collection of dummy timelines that can be used to fill-in missing items.
-				var timelineDictionary = new Dictionary<string, Spine.Timeline>();
-				foreach (var animation in animations) {
-					foreach (var timeline in animation.Timelines) {
+				Dictionary<string, Timeline> timelineDictionary = new Dictionary<string, Spine.Timeline>();
+				foreach (Animation animation in animations) {
+					foreach (Timeline timeline in animation.Timelines) {
 						if (timeline is EventTimeline) continue;
 						if (timeline is EventTimeline) continue;
 
 
 						foreach (string propertyId in timeline.PropertyIds) {
 						foreach (string propertyId in timeline.PropertyIds) {
@@ -72,20 +72,20 @@ namespace Spine.Unity.Examples {
 						}
 						}
 					}
 					}
 				}
 				}
-				var idsToMatch = new List<string>(timelineDictionary.Keys);
+				List<string> idsToMatch = new List<string>(timelineDictionary.Keys);
 
 
 				// For each animation in the list, check for and add missing timelines.
 				// For each animation in the list, check for and add missing timelines.
-				var currentAnimationIDs = new HashSet<string>();
-				foreach (var animation in animations) {
+				HashSet<string> currentAnimationIDs = new HashSet<string>();
+				foreach (Animation animation in animations) {
 					currentAnimationIDs.Clear();
 					currentAnimationIDs.Clear();
-					foreach (var timeline in animation.Timelines) {
+					foreach (Timeline timeline in animation.Timelines) {
 						if (timeline is EventTimeline) continue;
 						if (timeline is EventTimeline) continue;
 						foreach (string propertyId in timeline.PropertyIds) {
 						foreach (string propertyId in timeline.PropertyIds) {
 							currentAnimationIDs.Add(propertyId);
 							currentAnimationIDs.Add(propertyId);
 						}
 						}
 					}
 					}
 
 
-					var animationTimelines = animation.Timelines;
+					ExposedList<Timeline> animationTimelines = animation.Timelines;
 					foreach (string propertyId in idsToMatch) {
 					foreach (string propertyId in idsToMatch) {
 						if (!currentAnimationIDs.Contains(propertyId))
 						if (!currentAnimationIDs.Contains(propertyId))
 							animationTimelines.Add(timelineDictionary[propertyId]);
 							animationTimelines.Add(timelineDictionary[propertyId]);
@@ -134,52 +134,52 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			static RotateTimeline GetFillerTimeline (RotateTimeline timeline, SkeletonData skeletonData) {
 			static RotateTimeline GetFillerTimeline (RotateTimeline timeline, SkeletonData skeletonData) {
-				var t = new RotateTimeline(1, 0, timeline.BoneIndex);
+				RotateTimeline t = new RotateTimeline(1, 0, timeline.BoneIndex);
 				t.SetFrame(0, 0, 0);
 				t.SetFrame(0, 0, 0);
 				return t;
 				return t;
 			}
 			}
 
 
 			static TranslateTimeline GetFillerTimeline (TranslateTimeline timeline, SkeletonData skeletonData) {
 			static TranslateTimeline GetFillerTimeline (TranslateTimeline timeline, SkeletonData skeletonData) {
-				var t = new TranslateTimeline(1, 0, timeline.BoneIndex);
+				TranslateTimeline t = new TranslateTimeline(1, 0, timeline.BoneIndex);
 				t.SetFrame(0, 0, 0, 0);
 				t.SetFrame(0, 0, 0, 0);
 				return t;
 				return t;
 			}
 			}
 
 
 			static ScaleTimeline GetFillerTimeline (ScaleTimeline timeline, SkeletonData skeletonData) {
 			static ScaleTimeline GetFillerTimeline (ScaleTimeline timeline, SkeletonData skeletonData) {
-				var t = new ScaleTimeline(1, 0, timeline.BoneIndex);
+				ScaleTimeline t = new ScaleTimeline(1, 0, timeline.BoneIndex);
 				t.SetFrame(0, 0, 0, 0);
 				t.SetFrame(0, 0, 0, 0);
 				return t;
 				return t;
 			}
 			}
 
 
 			static ShearTimeline GetFillerTimeline (ShearTimeline timeline, SkeletonData skeletonData) {
 			static ShearTimeline GetFillerTimeline (ShearTimeline timeline, SkeletonData skeletonData) {
-				var t = new ShearTimeline(1, 0, timeline.BoneIndex);
+				ShearTimeline t = new ShearTimeline(1, 0, timeline.BoneIndex);
 				t.SetFrame(0, 0, 0, 0);
 				t.SetFrame(0, 0, 0, 0);
 				return t;
 				return t;
 			}
 			}
 
 
 			static AttachmentTimeline GetFillerTimeline (AttachmentTimeline timeline, SkeletonData skeletonData) {
 			static AttachmentTimeline GetFillerTimeline (AttachmentTimeline timeline, SkeletonData skeletonData) {
-				var t = new AttachmentTimeline(1, timeline.SlotIndex);
-				var slotData = skeletonData.Slots.Items[t.SlotIndex];
+				AttachmentTimeline t = new AttachmentTimeline(1, timeline.SlotIndex);
+				SlotData slotData = skeletonData.Slots.Items[t.SlotIndex];
 				t.SetFrame(0, 0, slotData.AttachmentName);
 				t.SetFrame(0, 0, slotData.AttachmentName);
 				return t;
 				return t;
 			}
 			}
 
 
 			static RGBATimeline GetFillerTimeline (RGBATimeline timeline, SkeletonData skeletonData) {
 			static RGBATimeline GetFillerTimeline (RGBATimeline timeline, SkeletonData skeletonData) {
-				var t = new RGBATimeline(1, 0, timeline.SlotIndex);
-				var slotData = skeletonData.Slots.Items[t.SlotIndex];
+				RGBATimeline t = new RGBATimeline(1, 0, timeline.SlotIndex);
+				SlotData slotData = skeletonData.Slots.Items[t.SlotIndex];
 				t.SetFrame(0, 0, slotData.R, slotData.G, slotData.B, slotData.A);
 				t.SetFrame(0, 0, slotData.R, slotData.G, slotData.B, slotData.A);
 				return t;
 				return t;
 			}
 			}
 
 
 			static RGBA2Timeline GetFillerTimeline (RGBA2Timeline timeline, SkeletonData skeletonData) {
 			static RGBA2Timeline GetFillerTimeline (RGBA2Timeline timeline, SkeletonData skeletonData) {
-				var t = new RGBA2Timeline(1, 0, timeline.SlotIndex);
-				var slotData = skeletonData.Slots.Items[t.SlotIndex];
+				RGBA2Timeline t = new RGBA2Timeline(1, 0, timeline.SlotIndex);
+				SlotData slotData = skeletonData.Slots.Items[t.SlotIndex];
 				t.SetFrame(0, 0, slotData.R, slotData.G, slotData.B, slotData.A, slotData.R2, slotData.G2, slotData.B2);
 				t.SetFrame(0, 0, slotData.R, slotData.G, slotData.B, slotData.A, slotData.R2, slotData.G2, slotData.B2);
 				return t;
 				return t;
 			}
 			}
 
 
 			static DeformTimeline GetFillerTimeline (DeformTimeline timeline, SkeletonData skeletonData) {
 			static DeformTimeline GetFillerTimeline (DeformTimeline timeline, SkeletonData skeletonData) {
-				var t = new DeformTimeline(1, 0, timeline.SlotIndex, timeline.Attachment);
+				DeformTimeline t = new DeformTimeline(1, 0, timeline.SlotIndex, timeline.Attachment);
 				if (t.Attachment.IsWeighted()) {
 				if (t.Attachment.IsWeighted()) {
 					t.SetFrame(0, 0, new float[t.Attachment.Vertices.Length]);
 					t.SetFrame(0, 0, new float[t.Attachment.Vertices.Length]);
 				} else {
 				} else {
@@ -190,42 +190,42 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			static DrawOrderTimeline GetFillerTimeline (DrawOrderTimeline timeline, SkeletonData skeletonData) {
 			static DrawOrderTimeline GetFillerTimeline (DrawOrderTimeline timeline, SkeletonData skeletonData) {
-				var t = new DrawOrderTimeline(1);
+				DrawOrderTimeline t = new DrawOrderTimeline(1);
 				t.SetFrame(0, 0, null); // null means use setup pose in DrawOrderTimeline.Apply.
 				t.SetFrame(0, 0, null); // null means use setup pose in DrawOrderTimeline.Apply.
 				return t;
 				return t;
 			}
 			}
 
 
 			static IkConstraintTimeline GetFillerTimeline (IkConstraintTimeline timeline, SkeletonData skeletonData) {
 			static IkConstraintTimeline GetFillerTimeline (IkConstraintTimeline timeline, SkeletonData skeletonData) {
-				var t = new IkConstraintTimeline(1, 0, timeline.IkConstraintIndex);
-				var ikConstraintData = skeletonData.IkConstraints.Items[timeline.IkConstraintIndex];
+				IkConstraintTimeline t = new IkConstraintTimeline(1, 0, timeline.IkConstraintIndex);
+				IkConstraintData ikConstraintData = skeletonData.IkConstraints.Items[timeline.IkConstraintIndex];
 				t.SetFrame(0, 0, ikConstraintData.Mix, ikConstraintData.Softness, ikConstraintData.BendDirection, ikConstraintData.Compress, ikConstraintData.Stretch);
 				t.SetFrame(0, 0, ikConstraintData.Mix, ikConstraintData.Softness, ikConstraintData.BendDirection, ikConstraintData.Compress, ikConstraintData.Stretch);
 				return t;
 				return t;
 			}
 			}
 
 
 			static TransformConstraintTimeline GetFillerTimeline (TransformConstraintTimeline timeline, SkeletonData skeletonData) {
 			static TransformConstraintTimeline GetFillerTimeline (TransformConstraintTimeline timeline, SkeletonData skeletonData) {
-				var t = new TransformConstraintTimeline(1, 0, timeline.TransformConstraintIndex);
-				var data = skeletonData.TransformConstraints.Items[timeline.TransformConstraintIndex];
+				TransformConstraintTimeline t = new TransformConstraintTimeline(1, 0, timeline.TransformConstraintIndex);
+				TransformConstraintData data = skeletonData.TransformConstraints.Items[timeline.TransformConstraintIndex];
 				t.SetFrame(0, 0, data.MixRotate, data.MixX, data.MixY, data.MixScaleX, data.MixScaleY, data.MixShearY);
 				t.SetFrame(0, 0, data.MixRotate, data.MixX, data.MixY, data.MixScaleX, data.MixScaleY, data.MixShearY);
 				return t;
 				return t;
 			}
 			}
 
 
 			static PathConstraintPositionTimeline GetFillerTimeline (PathConstraintPositionTimeline timeline, SkeletonData skeletonData) {
 			static PathConstraintPositionTimeline GetFillerTimeline (PathConstraintPositionTimeline timeline, SkeletonData skeletonData) {
-				var t = new PathConstraintPositionTimeline(1, 0, timeline.PathConstraintIndex);
-				var data = skeletonData.PathConstraints.Items[timeline.PathConstraintIndex];
+				PathConstraintPositionTimeline t = new PathConstraintPositionTimeline(1, 0, timeline.PathConstraintIndex);
+				PathConstraintData data = skeletonData.PathConstraints.Items[timeline.PathConstraintIndex];
 				t.SetFrame(0, 0, data.Position);
 				t.SetFrame(0, 0, data.Position);
 				return t;
 				return t;
 			}
 			}
 
 
 			static PathConstraintSpacingTimeline GetFillerTimeline (PathConstraintSpacingTimeline timeline, SkeletonData skeletonData) {
 			static PathConstraintSpacingTimeline GetFillerTimeline (PathConstraintSpacingTimeline timeline, SkeletonData skeletonData) {
-				var t = new PathConstraintSpacingTimeline(1, 0, timeline.PathConstraintIndex);
-				var data = skeletonData.PathConstraints.Items[timeline.PathConstraintIndex];
+				PathConstraintSpacingTimeline t = new PathConstraintSpacingTimeline(1, 0, timeline.PathConstraintIndex);
+				PathConstraintData data = skeletonData.PathConstraints.Items[timeline.PathConstraintIndex];
 				t.SetFrame(0, 0, data.Spacing);
 				t.SetFrame(0, 0, data.Spacing);
 				return t;
 				return t;
 			}
 			}
 
 
 			static PathConstraintMixTimeline GetFillerTimeline (PathConstraintMixTimeline timeline, SkeletonData skeletonData) {
 			static PathConstraintMixTimeline GetFillerTimeline (PathConstraintMixTimeline timeline, SkeletonData skeletonData) {
-				var t = new PathConstraintMixTimeline(1, 0, timeline.PathConstraintIndex);
-				var data = skeletonData.PathConstraints.Items[timeline.PathConstraintIndex];
+				PathConstraintMixTimeline t = new PathConstraintMixTimeline(1, 0, timeline.PathConstraintIndex);
+				PathConstraintData data = skeletonData.PathConstraints.Items[timeline.PathConstraintIndex];
 				t.SetFrame(0, 0, data.RotateMix, data.MixX, data.MixY);
 				t.SetFrame(0, 0, data.RotateMix, data.MixX, data.MixY);
 				return t;
 				return t;
 			}
 			}

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/EquipButtonExample.cs

@@ -51,7 +51,7 @@ namespace Spine.Unity.Examples {
 		void Start () {
 		void Start () {
 			MatchImage();
 			MatchImage();
 
 
-			var button = GetComponent<Button>();
+			Button button = GetComponent<Button>();
 			button.onClick.AddListener(
 			button.onClick.AddListener(
 				delegate { equipSystem.Equip(asset); }
 				delegate { equipSystem.Equip(asset); }
 			);
 			);

+ 5 - 5
spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/EquipSystemExample.cs

@@ -63,12 +63,12 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		public void Equip (EquipAssetExample asset) {
 		public void Equip (EquipAssetExample asset) {
-			var equipType = asset.equipType;
+			EquipType equipType = asset.equipType;
 			EquipHook howToEquip = equippables.Find(x => x.type == equipType);
 			EquipHook howToEquip = equippables.Find(x => x.type == equipType);
 
 
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			int slotIndex = skeletonData.FindSlot(howToEquip.slot).Index;
 			int slotIndex = skeletonData.FindSlot(howToEquip.slot).Index;
-			var attachment = GenerateAttachmentFromEquipAsset(asset, slotIndex, howToEquip.templateSkin, howToEquip.templateAttachment);
+			Attachment attachment = GenerateAttachmentFromEquipAsset(asset, slotIndex, howToEquip.templateSkin, howToEquip.templateAttachment);
 			target.Equip(slotIndex, howToEquip.templateAttachment, attachment);
 			target.Equip(slotIndex, howToEquip.templateAttachment, attachment);
 		}
 		}
 
 
@@ -77,8 +77,8 @@ namespace Spine.Unity.Examples {
 			cachedAttachments.TryGetValue(asset, out attachment);
 			cachedAttachments.TryGetValue(asset, out attachment);
 
 
 			if (attachment == null) {
 			if (attachment == null) {
-				var skeletonData = skeletonDataAsset.GetSkeletonData(true);
-				var templateSkin = skeletonData.FindSkin(templateSkinName);
+				SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
+				Skin templateSkin = skeletonData.FindSkin(templateSkinName);
 				Attachment templateAttachment = templateSkin.GetAttachment(slotIndex, templateAttachmentName);
 				Attachment templateAttachment = templateSkin.GetAttachment(slotIndex, templateAttachmentName);
 				attachment = templateAttachment.GetRemappedClone(asset.sprite, sourceMaterial, premultiplyAlpha: this.applyPMA);
 				attachment = templateAttachment.GetRemappedClone(asset.sprite, sourceMaterial, premultiplyAlpha: this.applyPMA);
 				// Note: Each call to `GetRemappedClone()` with parameter `premultiplyAlpha` set to `true` creates
 				// Note: Each call to `GetRemappedClone()` with parameter `premultiplyAlpha` set to `true` creates

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/EquipsVisualsComponentExample.cs

@@ -50,7 +50,7 @@ namespace Spine.Unity.Examples {
 			equipsSkin = new Skin("Equips");
 			equipsSkin = new Skin("Equips");
 
 
 			// OPTIONAL: Add all the attachments from the template skin.
 			// OPTIONAL: Add all the attachments from the template skin.
-			var templateSkin = skeletonAnimation.Skeleton.Data.FindSkin(templateSkinName);
+			Skin templateSkin = skeletonAnimation.Skeleton.Data.FindSkin(templateSkinName);
 			if (templateSkin != null)
 			if (templateSkin != null)
 				equipsSkin.AddSkin(templateSkin);
 				equipsSkin.AddSkin(templateSkin);
 
 
@@ -77,7 +77,7 @@ namespace Spine.Unity.Examples {
 				Destroy(runtimeMaterial);
 				Destroy(runtimeMaterial);
 			if (runtimeAtlas)
 			if (runtimeAtlas)
 				Destroy(runtimeAtlas);
 				Destroy(runtimeAtlas);
-			var repackedSkin = collectedSkin.GetRepackedSkin("Repacked skin", skeletonAnimation.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial,
+			Skin repackedSkin = collectedSkin.GetRepackedSkin("Repacked skin", skeletonAnimation.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial,
 				out runtimeMaterial, out runtimeAtlas, maxAtlasSize: 1024, clearCache: false);
 				out runtimeMaterial, out runtimeAtlas, maxAtlasSize: 1024, clearCache: false);
 			collectedSkin.Clear();
 			collectedSkin.Clear();
 
 

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/MixAndMatchSkinsButtonExample.cs

@@ -41,7 +41,7 @@ namespace Spine.Unity.Examples {
 		public MixAndMatchSkinsExample.ItemType itemType;
 		public MixAndMatchSkinsExample.ItemType itemType;
 
 
 		void Start () {
 		void Start () {
-			var button = GetComponent<Button>();
+			Button button = GetComponent<Button>();
 			button.onClick.AddListener(
 			button.onClick.AddListener(
 				delegate { skinsSystem.Equip(itemSkin, itemType); }
 				delegate { skinsSystem.Equip(itemSkin, itemType); }
 			);
 			);

+ 7 - 7
spine-unity/Assets/Spine Examples/Scripts/Mix and Match Character Customize/MixAndMatchSkinsExample.cs

@@ -135,7 +135,7 @@ namespace Spine.Unity.Examples {
 
 
 		public void OptimizeSkin () {
 		public void OptimizeSkin () {
 			// Create a repacked skin.
 			// Create a repacked skin.
-			var previousSkin = skeletonAnimation.Skeleton.Skin;
+			Skin previousSkin = skeletonAnimation.Skeleton.Skin;
 			// Note: materials and textures returned by GetRepackedSkin() behave like 'new Texture2D()' and need to be destroyed
 			// Note: materials and textures returned by GetRepackedSkin() behave like 'new Texture2D()' and need to be destroyed
 			if (runtimeMaterial)
 			if (runtimeMaterial)
 				Destroy(runtimeMaterial);
 				Destroy(runtimeMaterial);
@@ -159,8 +159,8 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void UpdateCharacterSkin () {
 		void UpdateCharacterSkin () {
-			var skeleton = skeletonAnimation.Skeleton;
-			var skeletonData = skeleton.Data;
+			Skeleton skeleton = skeletonAnimation.Skeleton;
+			SkeletonData skeletonData = skeleton.Data;
 			characterSkin = new Skin("character-base");
 			characterSkin = new Skin("character-base");
 			// Note that the result Skin returned by calls to skeletonData.FindSkin()
 			// Note that the result Skin returned by calls to skeletonData.FindSkin()
 			// could be cached once in Start() instead of searching for the same skin
 			// could be cached once in Start() instead of searching for the same skin
@@ -173,8 +173,8 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void AddEquipmentSkinsTo (Skin combinedSkin) {
 		void AddEquipmentSkinsTo (Skin combinedSkin) {
-			var skeleton = skeletonAnimation.Skeleton;
-			var skeletonData = skeleton.Data;
+			Skeleton skeleton = skeletonAnimation.Skeleton;
+			SkeletonData skeletonData = skeleton.Data;
 			combinedSkin.AddSkin(skeletonData.FindSkin(clothesSkin));
 			combinedSkin.AddSkin(skeletonData.FindSkin(clothesSkin));
 			combinedSkin.AddSkin(skeletonData.FindSkin(pantsSkin));
 			combinedSkin.AddSkin(skeletonData.FindSkin(pantsSkin));
 			if (!string.IsNullOrEmpty(bagSkin)) combinedSkin.AddSkin(skeletonData.FindSkin(bagSkin));
 			if (!string.IsNullOrEmpty(bagSkin)) combinedSkin.AddSkin(skeletonData.FindSkin(bagSkin));
@@ -182,8 +182,8 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void UpdateCombinedSkin () {
 		void UpdateCombinedSkin () {
-			var skeleton = skeletonAnimation.Skeleton;
-			var resultCombinedSkin = new Skin("character-combined");
+			Skeleton skeleton = skeletonAnimation.Skeleton;
+			Skin resultCombinedSkin = new Skin("character-combined");
 
 
 			resultCombinedSkin.AddSkin(characterSkin);
 			resultCombinedSkin.AddSkin(characterSkin);
 			AddEquipmentSkinsTo(resultCombinedSkin);
 			AddEquipmentSkinsTo(resultCombinedSkin);

+ 5 - 5
spine-unity/Assets/Spine Examples/Scripts/MixAndMatch.cs

@@ -64,7 +64,7 @@ namespace Spine.Unity.Examples {
 
 
 		void OnValidate () {
 		void OnValidate () {
 			if (sourceMaterial == null) {
 			if (sourceMaterial == null) {
-				var skeletonAnimation = GetComponent<SkeletonAnimation>();
+				SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
 				if (skeletonAnimation != null)
 				if (skeletonAnimation != null)
 					sourceMaterial = skeletonAnimation.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial;
 					sourceMaterial = skeletonAnimation.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial;
 			}
 			}
@@ -76,13 +76,13 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void Apply () {
 		void Apply () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
-			var skeleton = skeletonAnimation.Skeleton;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			Skeleton skeleton = skeletonAnimation.Skeleton;
 
 
 			// STEP 0: PREPARE SKINS
 			// STEP 0: PREPARE SKINS
 			// Let's prepare a new skin to be our custom skin with equips/customizations. We get a clone so our original skins are unaffected.
 			// Let's prepare a new skin to be our custom skin with equips/customizations. We get a clone so our original skins are unaffected.
 			customSkin = customSkin ?? new Skin("custom skin"); // This requires that all customizations are done with skin placeholders defined in Spine.
 			customSkin = customSkin ?? new Skin("custom skin"); // This requires that all customizations are done with skin placeholders defined in Spine.
-			var templateSkin = skeleton.Data.FindSkin(templateAttachmentsSkin);
+			Skin templateSkin = skeleton.Data.FindSkin(templateAttachmentsSkin);
 
 
 			// STEP 1: "EQUIP" ITEMS USING SPRITES
 			// STEP 1: "EQUIP" ITEMS USING SPRITES
 			// STEP 1.1 Find the original/template attachment.
 			// STEP 1.1 Find the original/template attachment.
@@ -120,7 +120,7 @@ namespace Spine.Unity.Examples {
 			// 				Combine all the attachment sources into one skin. Usually this means the default skin and the custom skin.
 			// 				Combine all the attachment sources into one skin. Usually this means the default skin and the custom skin.
 			// 				call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
 			// 				call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
 			if (repack) {
 			if (repack) {
-				var repackedSkin = new Skin("repacked skin");
+				Skin repackedSkin = new Skin("repacked skin");
 				repackedSkin.AddSkin(skeleton.Data.DefaultSkin); // Include the "default" skin. (everything outside of skin placeholders)
 				repackedSkin.AddSkin(skeleton.Data.DefaultSkin); // Include the "default" skin. (everything outside of skin placeholders)
 				repackedSkin.AddSkin(customSkin); // Include your new custom skin.
 				repackedSkin.AddSkin(customSkin); // Include your new custom skin.
 
 

+ 5 - 5
spine-unity/Assets/Spine Examples/Scripts/MixAndMatchGraphic.cs

@@ -63,7 +63,7 @@ namespace Spine.Unity.Examples {
 
 
 		void OnValidate () {
 		void OnValidate () {
 			if (sourceMaterial == null) {
 			if (sourceMaterial == null) {
-				var skeletonGraphic = GetComponent<SkeletonGraphic>();
+				SkeletonGraphic skeletonGraphic = GetComponent<SkeletonGraphic>();
 				if (skeletonGraphic != null)
 				if (skeletonGraphic != null)
 					sourceMaterial = skeletonGraphic.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial;
 					sourceMaterial = skeletonGraphic.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial;
 			}
 			}
@@ -76,15 +76,15 @@ namespace Spine.Unity.Examples {
 
 
 		[ContextMenu("Apply")]
 		[ContextMenu("Apply")]
 		void Apply () {
 		void Apply () {
-			var skeletonGraphic = GetComponent<SkeletonGraphic>();
-			var skeleton = skeletonGraphic.Skeleton;
+			SkeletonGraphic skeletonGraphic = GetComponent<SkeletonGraphic>();
+			Skeleton skeleton = skeletonGraphic.Skeleton;
 
 
 			// STEP 0: PREPARE SKINS
 			// STEP 0: PREPARE SKINS
 			// Let's prepare a new skin to be our custom skin with equips/customizations. We get a clone so our original skins are unaffected.
 			// Let's prepare a new skin to be our custom skin with equips/customizations. We get a clone so our original skins are unaffected.
 			customSkin = customSkin ?? new Skin("custom skin"); // This requires that all customizations are done with skin placeholders defined in Spine.
 			customSkin = customSkin ?? new Skin("custom skin"); // This requires that all customizations are done with skin placeholders defined in Spine.
 
 
 			// Next let's get the skin that contains our source attachments. These are the attachments that
 			// Next let's get the skin that contains our source attachments. These are the attachments that
-			var baseSkin = skeleton.Data.FindSkin(baseSkinName);
+			Skin baseSkin = skeleton.Data.FindSkin(baseSkinName);
 
 
 			// STEP 1: "EQUIP" ITEMS USING SPRITES
 			// STEP 1: "EQUIP" ITEMS USING SPRITES
 			// STEP 1.1 Find the original attachment.
 			// STEP 1.1 Find the original attachment.
@@ -119,7 +119,7 @@ namespace Spine.Unity.Examples {
 			// 				Combine all the attachment sources into one skin. Usually this means the default skin and the custom skin.
 			// 				Combine all the attachment sources into one skin. Usually this means the default skin and the custom skin.
 			// 				call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
 			// 				call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
 			if (repack) {
 			if (repack) {
-				var repackedSkin = new Skin("repacked skin");
+				Skin repackedSkin = new Skin("repacked skin");
 				repackedSkin.AddSkin(skeleton.Data.DefaultSkin);
 				repackedSkin.AddSkin(skeleton.Data.DefaultSkin);
 				repackedSkin.AddSkin(customSkin);
 				repackedSkin.AddSkin(customSkin);
 				// Note: materials and textures returned by GetRepackedSkin() behave like 'new Texture2D()' and need to be destroyed
 				// Note: materials and textures returned by GetRepackedSkin() behave like 'new Texture2D()' and need to be destroyed

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/RaggedySpineboy.cs

@@ -47,7 +47,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void AddRigidbody () {
 		void AddRigidbody () {
-			var rb = gameObject.AddComponent<Rigidbody2D>();
+			Rigidbody2D rb = gameObject.AddComponent<Rigidbody2D>();
 			rb.freezeRotation = true;
 			rb.freezeRotation = true;
 			naturalCollider.enabled = true;
 			naturalCollider.enabled = true;
 		}
 		}

+ 5 - 5
spine-unity/Assets/Spine Examples/Scripts/Sample Components/CombinedSkin.cs

@@ -40,21 +40,21 @@ namespace Spine.Unity.Examples {
 		Skin combinedSkin;
 		Skin combinedSkin;
 
 
 		void Start () {
 		void Start () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
 			if (skeletonComponent == null) return;
 			if (skeletonComponent == null) return;
-			var skeleton = skeletonComponent.Skeleton;
+			Skeleton skeleton = skeletonComponent.Skeleton;
 			if (skeleton == null) return;
 			if (skeleton == null) return;
 
 
 			combinedSkin = combinedSkin ?? new Skin("combined");
 			combinedSkin = combinedSkin ?? new Skin("combined");
 			combinedSkin.Clear();
 			combinedSkin.Clear();
-			foreach (var skinName in skinsToCombine) {
-				var skin = skeleton.Data.FindSkin(skinName);
+			foreach (string skinName in skinsToCombine) {
+				Skin skin = skeleton.Data.FindSkin(skinName);
 				if (skin != null) combinedSkin.AddSkin(skin);
 				if (skin != null) combinedSkin.AddSkin(skin);
 			}
 			}
 
 
 			skeleton.SetSkin(combinedSkin);
 			skeleton.SetSkin(combinedSkin);
 			skeleton.SetToSetupPose();
 			skeleton.SetToSetupPose();
-			var animationStateComponent = skeletonComponent as IAnimationStateComponent;
+			IAnimationStateComponent animationStateComponent = skeletonComponent as IAnimationStateComponent;
 			if (animationStateComponent != null) animationStateComponent.AnimationState.Apply(skeleton);
 			if (animationStateComponent != null) animationStateComponent.AnimationState.Apply(skeleton);
 		}
 		}
 	}
 	}

+ 4 - 4
spine-unity/Assets/Spine Examples/Scripts/Sample Components/Ghost/SkeletonGhost.cs

@@ -92,7 +92,7 @@ namespace Spine.Unity.Examples {
 					go.hideFlags = GhostHideFlags;
 					go.hideFlags = GhostHideFlags;
 				}
 				}
 
 
-				var skeletonAnimation = skeletonRenderer as Spine.Unity.IAnimationStateComponent;
+				IAnimationStateComponent skeletonAnimation = skeletonRenderer as Spine.Unity.IAnimationStateComponent;
 				if (skeletonAnimation != null)
 				if (skeletonAnimation != null)
 					skeletonAnimation.AnimationState.Event += OnEvent;
 					skeletonAnimation.AnimationState.Event += OnEvent;
 			}
 			}
@@ -130,7 +130,7 @@ namespace Spine.Unity.Examples {
 
 
 				Material[] materials = meshRenderer.sharedMaterials;
 				Material[] materials = meshRenderer.sharedMaterials;
 				for (int i = 0; i < materials.Length; i++) {
 				for (int i = 0; i < materials.Length; i++) {
-					var originalMat = materials[i];
+					Material originalMat = materials[i];
 					Material ghostMat;
 					Material ghostMat;
 					if (!materialTable.ContainsKey(originalMat)) {
 					if (!materialTable.ContainsKey(originalMat)) {
 						ghostMat = new Material(originalMat) {
 						ghostMat = new Material(originalMat) {
@@ -149,7 +149,7 @@ namespace Spine.Unity.Examples {
 					materials[i] = ghostMat;
 					materials[i] = ghostMat;
 				}
 				}
 
 
-				var goTransform = go.transform;
+				Transform goTransform = go.transform;
 				goTransform.parent = transform;
 				goTransform.parent = transform;
 
 
 				pool[poolIndex].Initialize(meshFilter.sharedMesh, materials, color, additive, fadeSpeed, meshRenderer.sortingLayerID, (sortWithDistanceOnly) ? meshRenderer.sortingOrder : meshRenderer.sortingOrder - 1);
 				pool[poolIndex].Initialize(meshFilter.sharedMesh, materials, color, additive, fadeSpeed, meshRenderer.sortingLayerID, (sortWithDistanceOnly) ? meshRenderer.sortingOrder : meshRenderer.sortingOrder - 1);
@@ -175,7 +175,7 @@ namespace Spine.Unity.Examples {
 					if (pool[i] != null) pool[i].Cleanup();
 					if (pool[i] != null) pool[i].Cleanup();
 			}
 			}
 
 
-			foreach (var mat in materialTable.Values)
+			foreach (Material mat in materialTable.Values)
 				Destroy(mat);
 				Destroy(mat);
 		}
 		}
 
 

+ 3 - 3
spine-unity/Assets/Spine Examples/Scripts/Sample Components/Legacy/AtlasRegionAttacher.cs

@@ -50,7 +50,7 @@ namespace Spine.Unity.Examples {
 		Atlas atlas;
 		Atlas atlas;
 
 
 		void Awake () {
 		void Awake () {
-			var skeletonRenderer = GetComponent<SkeletonRenderer>();
+			SkeletonRenderer skeletonRenderer = GetComponent<SkeletonRenderer>();
 			skeletonRenderer.OnRebuild += Apply;
 			skeletonRenderer.OnRebuild += Apply;
 			if (skeletonRenderer.valid) Apply(skeletonRenderer);
 			if (skeletonRenderer.valid) Apply(skeletonRenderer);
 		}
 		}
@@ -62,7 +62,7 @@ namespace Spine.Unity.Examples {
 			if (atlas == null) return;
 			if (atlas == null) return;
 			float scale = skeletonRenderer.skeletonDataAsset.scale;
 			float scale = skeletonRenderer.skeletonDataAsset.scale;
 
 
-			foreach (var entry in attachments) {
+			foreach (SlotRegionPair entry in attachments) {
 				Slot slot = skeletonRenderer.Skeleton.FindSlot(entry.slot);
 				Slot slot = skeletonRenderer.Skeleton.FindSlot(entry.slot);
 				Attachment originalAttachment = slot.Attachment;
 				Attachment originalAttachment = slot.Attachment;
 				AtlasRegion region = atlas.FindRegion(entry.region);
 				AtlasRegion region = atlas.FindRegion(entry.region);
@@ -72,7 +72,7 @@ namespace Spine.Unity.Examples {
 				} else if (inheritProperties && originalAttachment != null) {
 				} else if (inheritProperties && originalAttachment != null) {
 					slot.Attachment = originalAttachment.GetRemappedClone(region, true, true, scale);
 					slot.Attachment = originalAttachment.GetRemappedClone(region, true, true, scale);
 				} else {
 				} else {
-					var newRegionAttachment = region.ToRegionAttachment(region.name, scale);
+					RegionAttachment newRegionAttachment = region.ToRegionAttachment(region.name, scale);
 					slot.Attachment = newRegionAttachment;
 					slot.Attachment = newRegionAttachment;
 				}
 				}
 			}
 			}

+ 10 - 10
spine-unity/Assets/Spine Examples/Scripts/Sample Components/Legacy/SpriteAttacher.cs

@@ -47,14 +47,14 @@ namespace Spine.Unity.Examples {
 
 
 #if UNITY_EDITOR
 #if UNITY_EDITOR
 		void OnValidate () {
 		void OnValidate () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
-			var skeletonRenderer = skeletonComponent as SkeletonRenderer;
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
+			SkeletonRenderer skeletonRenderer = skeletonComponent as SkeletonRenderer;
 			bool applyPMA;
 			bool applyPMA;
 
 
 			if (skeletonRenderer != null) {
 			if (skeletonRenderer != null) {
 				applyPMA = skeletonRenderer.pmaVertexColors;
 				applyPMA = skeletonRenderer.pmaVertexColors;
 			} else {
 			} else {
-				var skeletonGraphic = skeletonComponent as SkeletonGraphic;
+				SkeletonGraphic skeletonGraphic = skeletonComponent as SkeletonGraphic;
 				applyPMA = skeletonGraphic != null && skeletonGraphic.MeshGenerator.settings.pmaVertexColors;
 				applyPMA = skeletonGraphic != null && skeletonGraphic.MeshGenerator.settings.pmaVertexColors;
 			}
 			}
 
 
@@ -82,7 +82,7 @@ namespace Spine.Unity.Examples {
 			AtlasPage atlasPage;
 			AtlasPage atlasPage;
 			atlasPageCache.TryGetValue(texture, out atlasPage);
 			atlasPageCache.TryGetValue(texture, out atlasPage);
 			if (atlasPage == null) {
 			if (atlasPage == null) {
-				var newMaterial = new Material(shader);
+				Material newMaterial = new Material(shader);
 				atlasPage = newMaterial.ToSpineAtlasPage();
 				atlasPage = newMaterial.ToSpineAtlasPage();
 				atlasPageCache[texture] = atlasPage;
 				atlasPageCache[texture] = atlasPage;
 			}
 			}
@@ -105,19 +105,19 @@ namespace Spine.Unity.Examples {
 		public void Initialize (bool overwrite = true) {
 		public void Initialize (bool overwrite = true) {
 			if (overwrite || attachment == null) {
 			if (overwrite || attachment == null) {
 				// Get the applyPMA value.
 				// Get the applyPMA value.
-				var skeletonComponent = GetComponent<ISkeletonComponent>();
-				var skeletonRenderer = skeletonComponent as SkeletonRenderer;
+				ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
+				SkeletonRenderer skeletonRenderer = skeletonComponent as SkeletonRenderer;
 				if (skeletonRenderer != null)
 				if (skeletonRenderer != null)
 					this.applyPMA = skeletonRenderer.pmaVertexColors;
 					this.applyPMA = skeletonRenderer.pmaVertexColors;
 				else {
 				else {
-					var skeletonGraphic = skeletonComponent as SkeletonGraphic;
+					SkeletonGraphic skeletonGraphic = skeletonComponent as SkeletonGraphic;
 					if (skeletonGraphic != null)
 					if (skeletonGraphic != null)
 						this.applyPMA = skeletonGraphic.MeshGenerator.settings.pmaVertexColors;
 						this.applyPMA = skeletonGraphic.MeshGenerator.settings.pmaVertexColors;
 				}
 				}
 
 
 				// Subscribe to UpdateComplete to override animation keys.
 				// Subscribe to UpdateComplete to override animation keys.
 				if (overrideAnimation) {
 				if (overrideAnimation) {
-					var animatedSkeleton = skeletonComponent as ISkeletonAnimation;
+					ISkeletonAnimation animatedSkeleton = skeletonComponent as ISkeletonAnimation;
 					if (animatedSkeleton != null) {
 					if (animatedSkeleton != null) {
 						animatedSkeleton.UpdateComplete -= AnimationOverrideSpriteAttach;
 						animatedSkeleton.UpdateComplete -= AnimationOverrideSpriteAttach;
 						animatedSkeleton.UpdateComplete += AnimationOverrideSpriteAttach;
 						animatedSkeleton.UpdateComplete += AnimationOverrideSpriteAttach;
@@ -134,7 +134,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		void OnDestroy () {
 		void OnDestroy () {
-			var animatedSkeleton = GetComponent<ISkeletonAnimation>();
+			ISkeletonAnimation animatedSkeleton = GetComponent<ISkeletonAnimation>();
 			if (animatedSkeleton != null)
 			if (animatedSkeleton != null)
 				animatedSkeleton.UpdateComplete -= AnimationOverrideSpriteAttach;
 				animatedSkeleton.UpdateComplete -= AnimationOverrideSpriteAttach;
 		}
 		}
@@ -170,7 +170,7 @@ namespace Spine.Unity.Examples {
 		public static RegionAttachment AddUnitySprite (this SkeletonData skeletonData, string slotName, Sprite sprite, string skinName, Shader shader, bool applyPMA, float rotation = 0f) {
 		public static RegionAttachment AddUnitySprite (this SkeletonData skeletonData, string slotName, Sprite sprite, string skinName, Shader shader, bool applyPMA, float rotation = 0f) {
 			RegionAttachment att = applyPMA ? sprite.ToRegionAttachmentPMAClone(shader, rotation: rotation) : sprite.ToRegionAttachment(new Material(shader), rotation);
 			RegionAttachment att = applyPMA ? sprite.ToRegionAttachmentPMAClone(shader, rotation: rotation) : sprite.ToRegionAttachment(new Material(shader), rotation);
 
 
-			var slotIndex = skeletonData.FindSlot(slotName).Index;
+			int slotIndex = skeletonData.FindSlot(slotName).Index;
 			Skin skin = skeletonData.DefaultSkin;
 			Skin skin = skeletonData.DefaultSkin;
 			if (skinName != "")
 			if (skinName != "")
 				skin = skeletonData.FindSkin(skinName);
 				skin = skeletonData.FindSkin(skinName);

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Sample Components/OutlineSkeletonGraphic.cs

@@ -44,7 +44,7 @@ namespace Spine.Unity.Examples {
 
 
 			// Add normal material as default
 			// Add normal material as default
 			if (skeletonGraphic != null && skeletonGraphic.skeletonDataAsset != null) {
 			if (skeletonGraphic != null && skeletonGraphic.skeletonDataAsset != null) {
-				var atlasAssets = skeletonGraphic.skeletonDataAsset.atlasAssets;
+				AtlasAssetBase[] atlasAssets = skeletonGraphic.skeletonDataAsset.atlasAssets;
 
 
 				if (atlasAssets.Length > 0 && atlasAssets[0].PrimaryMaterial) {
 				if (atlasAssets.Length > 0 && atlasAssets[0].PrimaryMaterial) {
 					materialWithoutOutline = atlasAssets[0].PrimaryMaterial;
 					materialWithoutOutline = atlasAssets[0].PrimaryMaterial;

+ 5 - 5
spine-unity/Assets/Spine Examples/Scripts/Sample Components/RenderExistingMesh.cs

@@ -68,7 +68,7 @@ namespace Spine.Unity.Examples {
 					return;
 					return;
 			}
 			}
 
 
-			var parentMaterials = referenceRenderer.sharedMaterials;
+			Material[] parentMaterials = referenceRenderer.sharedMaterials;
 			if (replacementMaterials.Length != parentMaterials.Length) {
 			if (replacementMaterials.Length != parentMaterials.Length) {
 				replacementMaterials = new MaterialReplacement[parentMaterials.Length];
 				replacementMaterials = new MaterialReplacement[parentMaterials.Length];
 			}
 			}
@@ -87,7 +87,7 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			// subscribe to OnMeshAndMaterialsUpdated
 			// subscribe to OnMeshAndMaterialsUpdated
-			var skeletonRenderer = referenceRenderer.GetComponent<SkeletonAnimation>();
+			SkeletonAnimation skeletonRenderer = referenceRenderer.GetComponent<SkeletonAnimation>();
 			if (skeletonRenderer) {
 			if (skeletonRenderer) {
 				skeletonRenderer.OnMeshAndMaterialsUpdated -= UpdateOnCallback;
 				skeletonRenderer.OnMeshAndMaterialsUpdated -= UpdateOnCallback;
 				skeletonRenderer.OnMeshAndMaterialsUpdated += UpdateOnCallback;
 				skeletonRenderer.OnMeshAndMaterialsUpdated += UpdateOnCallback;
@@ -128,12 +128,12 @@ namespace Spine.Unity.Examples {
 		void UpdateMaterials () {
 		void UpdateMaterials () {
 			ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;
 			ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;
 
 
-			var parentMaterials = referenceRenderer.sharedMaterials;
+			Material[] parentMaterials = referenceRenderer.sharedMaterials;
 			if (sharedMaterials.Length != parentMaterials.Length) {
 			if (sharedMaterials.Length != parentMaterials.Length) {
 				sharedMaterials = new Material[parentMaterials.Length];
 				sharedMaterials = new Material[parentMaterials.Length];
 			}
 			}
 			for (int i = 0; i < parentMaterials.Length; ++i) {
 			for (int i = 0; i < parentMaterials.Length; ++i) {
-				var parentMaterial = parentMaterials[i];
+				Material parentMaterial = parentMaterials[i];
 				if (replacementMaterialDict.ContainsKey(parentMaterial)) {
 				if (replacementMaterialDict.ContainsKey(parentMaterial)) {
 					sharedMaterials[i] = replacementMaterialDict[parentMaterial];
 					sharedMaterials[i] = replacementMaterialDict[parentMaterial];
 				}
 				}
@@ -143,7 +143,7 @@ namespace Spine.Unity.Examples {
 
 
 		void InitializeDict () {
 		void InitializeDict () {
 			for (int i = 0; i < replacementMaterials.Length; ++i) {
 			for (int i = 0; i < replacementMaterials.Length; ++i) {
-				var entry = replacementMaterials[i];
+				MaterialReplacement entry = replacementMaterials[i];
 				replacementMaterialDict[entry.originalMaterial] = entry.replacementMaterial;
 				replacementMaterialDict[entry.originalMaterial] = entry.replacementMaterial;
 			}
 			}
 		}
 		}

+ 3 - 3
spine-unity/Assets/Spine Examples/Scripts/Sample Components/Sample VertexEffects/JitterEffectExample.cs

@@ -62,13 +62,13 @@ namespace Spine.Unity.Examples {
 			int vertexCount = buffers.vertexCount;
 			int vertexCount = buffers.vertexCount;
 
 
 			// Modify vertex positions by accessing Vector3[] vertexBuffer
 			// Modify vertex positions by accessing Vector3[] vertexBuffer
-			var vertices = buffers.vertexBuffer;
+			Vector3[] vertices = buffers.vertexBuffer;
 			for (int i = 0; i < vertexCount; i++)
 			for (int i = 0; i < vertexCount; i++)
 				vertices[i] += (Vector3)(Random.insideUnitCircle * jitterMagnitude);
 				vertices[i] += (Vector3)(Random.insideUnitCircle * jitterMagnitude);
 
 
 			// You can also modify uvs and colors.
 			// You can also modify uvs and colors.
-			//var uvs = buffers.uvBuffer;
-			//var colors = buffers.colorBuffer;
+			//Vector2[] uvs = buffers.uvBuffer;
+			//Color32[] colors = buffers.colorBuffer;
 
 
 			//
 			//
 		}
 		}

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/Sample Components/Sample VertexEffects/TwoByTwoTransformEffectExample.cs

@@ -62,7 +62,7 @@ namespace Spine.Unity.Examples {
 			int vertexCount = buffers.vertexCount; // For efficiency, limit your effect to the actual mesh vertex count using vertexCount
 			int vertexCount = buffers.vertexCount; // For efficiency, limit your effect to the actual mesh vertex count using vertexCount
 
 
 			// Modify vertex positions by accessing Vector3[] vertexBuffer
 			// Modify vertex positions by accessing Vector3[] vertexBuffer
-			var vertices = buffers.vertexBuffer;
+			Vector3[] vertices = buffers.vertexBuffer;
 			Vector3 transformedPos = default(Vector3);
 			Vector3 transformedPos = default(Vector3);
 			for (int i = 0; i < vertexCount; i++) {
 			for (int i = 0; i < vertexCount; i++) {
 				Vector3 originalPos = vertices[i];
 				Vector3 originalPos = vertices[i];
@@ -89,7 +89,7 @@ public class TwoByTwoTransformEffectExampleEditor : UnityEditor.Editor {
 	Spine.Unity.Examples.TwoByTwoTransformEffectExample Target { get { return target as Spine.Unity.Examples.TwoByTwoTransformEffectExample; } }
 	Spine.Unity.Examples.TwoByTwoTransformEffectExample Target { get { return target as Spine.Unity.Examples.TwoByTwoTransformEffectExample; } }
 
 
 	void OnSceneGUI () {
 	void OnSceneGUI () {
-		var transform = Target.transform;
+		Transform transform = Target.transform;
 		LocalVectorHandle(ref Target.xAxis, transform, Color.red);
 		LocalVectorHandle(ref Target.xAxis, transform, Color.red);
 		LocalVectorHandle(ref Target.yAxis, transform, Color.green);
 		LocalVectorHandle(ref Target.yAxis, transform, Color.green);
 	}
 	}

+ 3 - 3
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SetRigidbodySolverIterations.cs

@@ -44,9 +44,9 @@ namespace Spine.Unity.Examples {
 		public int solverIterations = 30;
 		public int solverIterations = 30;
 
 
 		void Awake () {
 		void Awake () {
-			var rigidbodies = this.GetComponentsInChildren<Rigidbody>();
-			foreach (var rb in rigidbodies) {
-				rb.solverIterations = solverIterations;
+			Rigidbody[] rigidbodies = this.GetComponentsInChildren<Rigidbody>();
+			foreach (Rigidbody rigidbody in rigidbodies) {
+				rigidbody.solverIterations = solverIterations;
 			}
 			}
 		}
 		}
 	}
 	}

+ 6 - 6
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonColorInitialize.cs

@@ -48,10 +48,10 @@ namespace Spine.Unity.Prototyping {
 
 
 #if UNITY_EDITOR
 #if UNITY_EDITOR
 		void OnValidate () {
 		void OnValidate () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
 			if (skeletonComponent != null) {
 			if (skeletonComponent != null) {
 				skeletonComponent.Skeleton.SetSlotsToSetupPose();
 				skeletonComponent.Skeleton.SetSlotsToSetupPose();
-				var animationStateComponent = GetComponent<IAnimationStateComponent>();
+				IAnimationStateComponent animationStateComponent = GetComponent<IAnimationStateComponent>();
 				if (animationStateComponent != null && animationStateComponent.AnimationState != null) {
 				if (animationStateComponent != null && animationStateComponent.AnimationState != null) {
 					animationStateComponent.AnimationState.Apply(skeletonComponent.Skeleton);
 					animationStateComponent.AnimationState.Apply(skeletonComponent.Skeleton);
 				}
 				}
@@ -65,13 +65,13 @@ namespace Spine.Unity.Prototyping {
 		}
 		}
 
 
 		void ApplySettings () {
 		void ApplySettings () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
 			if (skeletonComponent != null) {
 			if (skeletonComponent != null) {
-				var skeleton = skeletonComponent.Skeleton;
+				Skeleton skeleton = skeletonComponent.Skeleton;
 				skeleton.SetColor(skeletonColor);
 				skeleton.SetColor(skeletonColor);
 
 
-				foreach (var s in slotSettings) {
-					var slot = skeleton.FindSlot(s.slot);
+				foreach (SlotSettings s in slotSettings) {
+					Slot slot = skeleton.FindSlot(s.slot);
 					if (slot != null) slot.SetColor(s.color);
 					if (slot != null) slot.SetColor(s.color);
 				}
 				}
 
 

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonGraphicPlayAnimationAtEvent.cs

@@ -37,12 +37,12 @@ public class SkeletonGraphicPlayAnimationAtEvent : MonoBehaviour {
 	public float playbackSpeed = 1.0f;
 	public float playbackSpeed = 1.0f;
 
 
 	public void PlayAnimationLooping (string animation) {
 	public void PlayAnimationLooping (string animation) {
-		var entry = skeletonGraphic.AnimationState.SetAnimation(trackIndex, animation, true);
+		Spine.TrackEntry entry = skeletonGraphic.AnimationState.SetAnimation(trackIndex, animation, true);
 		entry.TimeScale = playbackSpeed;
 		entry.TimeScale = playbackSpeed;
 	}
 	}
 
 
 	public void PlayAnimationOnce (string animation) {
 	public void PlayAnimationOnce (string animation) {
-		var entry = skeletonGraphic.AnimationState.SetAnimation(trackIndex, animation, false);
+		Spine.TrackEntry entry = skeletonGraphic.AnimationState.SetAnimation(trackIndex, animation, false);
 		entry.TimeScale = playbackSpeed;
 		entry.TimeScale = playbackSpeed;
 	}
 	}
 
 

+ 5 - 5
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonGraphicRenderTexture.cs

@@ -94,7 +94,7 @@ namespace Spine.Unity.Examples {
 			skeletonGraphic = this.GetComponent<SkeletonGraphic>();
 			skeletonGraphic = this.GetComponent<SkeletonGraphic>();
 			AtlasAssetBase[] atlasAssets = skeletonGraphic.SkeletonDataAsset.atlasAssets;
 			AtlasAssetBase[] atlasAssets = skeletonGraphic.SkeletonDataAsset.atlasAssets;
 			for (int i = 0; i < atlasAssets.Length; ++i) {
 			for (int i = 0; i < atlasAssets.Length; ++i) {
-				foreach (var material in atlasAssets[i].Materials) {
+				foreach (Material material in atlasAssets[i].Materials) {
 					if (material.mainTexture != null) {
 					if (material.mainTexture != null) {
 						meshRendererMaterialForTexture.Add(
 						meshRendererMaterialForTexture.Add(
 							new TextureMaterialPair(material.mainTexture, material));
 							new TextureMaterialPair(material.mainTexture, material));
@@ -109,7 +109,7 @@ namespace Spine.Unity.Examples {
 			skeletonGraphic.AssignMeshOverrideMultipleRenderers += RenderMultipleMeshesToRenderTexture;
 			skeletonGraphic.AssignMeshOverrideMultipleRenderers += RenderMultipleMeshesToRenderTexture;
 			skeletonGraphic.disableMeshAssignmentOnOverride = true;
 			skeletonGraphic.disableMeshAssignmentOnOverride = true;
 			skeletonGraphic.OnMeshAndMaterialsUpdated += RenderOntoQuad;
 			skeletonGraphic.OnMeshAndMaterialsUpdated += RenderOntoQuad;
-			var canvasRenderers = skeletonGraphic.canvasRenderers;
+			List<CanvasRenderer> canvasRenderers = skeletonGraphic.canvasRenderers;
 			for (int i = 0; i < canvasRenderers.Count; ++i)
 			for (int i = 0; i < canvasRenderers.Count; ++i)
 				canvasRenderers[i].cull = true;
 				canvasRenderers[i].cull = true;
 
 
@@ -123,7 +123,7 @@ namespace Spine.Unity.Examples {
 			skeletonGraphic.AssignMeshOverrideMultipleRenderers -= RenderMultipleMeshesToRenderTexture;
 			skeletonGraphic.AssignMeshOverrideMultipleRenderers -= RenderMultipleMeshesToRenderTexture;
 			skeletonGraphic.disableMeshAssignmentOnOverride = false;
 			skeletonGraphic.disableMeshAssignmentOnOverride = false;
 			skeletonGraphic.OnMeshAndMaterialsUpdated -= RenderOntoQuad;
 			skeletonGraphic.OnMeshAndMaterialsUpdated -= RenderOntoQuad;
-			var canvasRenderers = skeletonGraphic.canvasRenderers;
+			List<CanvasRenderer> canvasRenderers = skeletonGraphic.canvasRenderers;
 			for (int i = 0; i < canvasRenderers.Count; ++i)
 			for (int i = 0; i < canvasRenderers.Count; ++i)
 				canvasRenderers[i].cull = false;
 				canvasRenderers[i].cull = false;
 
 
@@ -214,8 +214,8 @@ namespace Spine.Unity.Examples {
 			quadRawImage.color = color;
 			quadRawImage.color = color;
 			quadCanvasRenderer.SetColor(color);
 			quadCanvasRenderer.SetColor(color);
 
 
-			var srcRectTransform = skeletonGraphic.rectTransform;
-			var dstRectTransform = quadRawImage.rectTransform;
+			RectTransform srcRectTransform = skeletonGraphic.rectTransform;
+			RectTransform dstRectTransform = quadRawImage.rectTransform;
 
 
 			dstRectTransform.anchorMin = srcRectTransform.anchorMin;
 			dstRectTransform.anchorMin = srcRectTransform.anchorMin;
 			dstRectTransform.anchorMax = srcRectTransform.anchorMax;
 			dstRectTransform.anchorMax = srcRectTransform.anchorMax;

+ 33 - 33
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonRagdoll.cs

@@ -114,7 +114,7 @@ namespace Spine.Unity.Examples {
 				if (!isActive)
 				if (!isActive)
 					return new Rigidbody[0];
 					return new Rigidbody[0];
 
 
-				var rigidBodies = new Rigidbody[boneTable.Count];
+				Rigidbody[] rigidBodies = new Rigidbody[boneTable.Count];
 				int i = 0;
 				int i = 0;
 				foreach (Transform t in boneTable.Values) {
 				foreach (Transform t in boneTable.Values) {
 					rigidBodies[i] = t.GetComponent<Rigidbody>();
 					rigidBodies[i] = t.GetComponent<Rigidbody>();
@@ -140,10 +140,10 @@ namespace Spine.Unity.Examples {
 			RootRigidbody = boneTable[StartingBone].GetComponent<Rigidbody>();
 			RootRigidbody = boneTable[StartingBone].GetComponent<Rigidbody>();
 			RootRigidbody.isKinematic = pinStartBone;
 			RootRigidbody.isKinematic = pinStartBone;
 			RootRigidbody.mass = rootMass;
 			RootRigidbody.mass = rootMass;
-			var boneColliders = new List<Collider>();
-			foreach (var pair in boneTable) {
-				var b = pair.Key;
-				var t = pair.Value;
+			List<Collider> boneColliders = new List<Collider>();
+			foreach (KeyValuePair<Bone, Transform> pair in boneTable) {
+				Bone b = pair.Key;
+				Transform t = pair.Value;
 				Transform parentTransform;
 				Transform parentTransform;
 				boneColliders.Add(t.GetComponent<Collider>());
 				boneColliders.Add(t.GetComponent<Collider>());
 				if (b == StartingBone) {
 				if (b == StartingBone) {
@@ -163,9 +163,9 @@ namespace Spine.Unity.Examples {
 				}
 				}
 
 
 				// Add joint and attach to parent.
 				// Add joint and attach to parent.
-				var rbParent = parentTransform.GetComponent<Rigidbody>();
+				Rigidbody rbParent = parentTransform.GetComponent<Rigidbody>();
 				if (rbParent != null) {
 				if (rbParent != null) {
-					var joint = t.gameObject.AddComponent<HingeJoint>();
+					HingeJoint joint = t.gameObject.AddComponent<HingeJoint>();
 					joint.connectedBody = rbParent;
 					joint.connectedBody = rbParent;
 					Vector3 localPos = parentTransform.InverseTransformPoint(t.position);
 					Vector3 localPos = parentTransform.InverseTransformPoint(t.position);
 					localPos.x *= 1;
 					localPos.x *= 1;
@@ -191,10 +191,10 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			// Destroy existing override-mode SkeletonUtilityBones.
 			// Destroy existing override-mode SkeletonUtilityBones.
-			var utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
+			SkeletonUtilityBone[] utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
 			if (utilityBones.Length > 0) {
 			if (utilityBones.Length > 0) {
-				var destroyedUtilityBoneNames = new List<string>();
-				foreach (var ub in utilityBones) {
+				List<string> destroyedUtilityBoneNames = new List<string>();
+				foreach (SkeletonUtilityBone ub in utilityBones) {
 					if (ub.mode == SkeletonUtilityBone.Mode.Override) {
 					if (ub.mode == SkeletonUtilityBone.Mode.Override) {
 						destroyedUtilityBoneNames.Add(ub.gameObject.name);
 						destroyedUtilityBoneNames.Add(ub.gameObject.name);
 						Destroy(ub.gameObject);
 						Destroy(ub.gameObject);
@@ -214,13 +214,13 @@ namespace Spine.Unity.Examples {
 
 
 			// Disable skeleton constraints.
 			// Disable skeleton constraints.
 			if (disableIK) {
 			if (disableIK) {
-				var ikConstraints = skeleton.IkConstraints;
+				ExposedList<IkConstraint> ikConstraints = skeleton.IkConstraints;
 				for (int i = 0, n = ikConstraints.Count; i < n; i++)
 				for (int i = 0, n = ikConstraints.Count; i < n; i++)
 					ikConstraints.Items[i].Mix = 0;
 					ikConstraints.Items[i].Mix = 0;
 			}
 			}
 
 
 			if (disableOtherConstraints) {
 			if (disableOtherConstraints) {
-				var transformConstraints = skeleton.TransformConstraints;
+				ExposedList<TransformConstraint> transformConstraints = skeleton.TransformConstraints;
 				for (int i = 0, n = transformConstraints.Count; i < n; i++) {
 				for (int i = 0, n = transformConstraints.Count; i < n; i++) {
 					transformConstraints.Items[i].MixRotate = 0;
 					transformConstraints.Items[i].MixRotate = 0;
 					transformConstraints.Items[i].MixScaleX = 0;
 					transformConstraints.Items[i].MixScaleX = 0;
@@ -230,7 +230,7 @@ namespace Spine.Unity.Examples {
 					transformConstraints.Items[i].MixY = 0;
 					transformConstraints.Items[i].MixY = 0;
 				}
 				}
 
 
-				var pathConstraints = skeleton.PathConstraints;
+				ExposedList<PathConstraint> pathConstraints = skeleton.PathConstraints;
 				for (int i = 0, n = pathConstraints.Count; i < n; i++) {
 				for (int i = 0, n = pathConstraints.Count; i < n; i++) {
 					pathConstraints.Items[i].MixRotate = 0;
 					pathConstraints.Items[i].MixRotate = 0;
 					pathConstraints.Items[i].MixX = 0;
 					pathConstraints.Items[i].MixX = 0;
@@ -275,7 +275,7 @@ namespace Spine.Unity.Examples {
 		/// <summary>Removes the ragdoll instance and effect from the animated skeleton.</summary>
 		/// <summary>Removes the ragdoll instance and effect from the animated skeleton.</summary>
 		public void Remove () {
 		public void Remove () {
 			isActive = false;
 			isActive = false;
-			foreach (var t in boneTable.Values)
+			foreach (Transform t in boneTable.Values)
 				Destroy(t.gameObject);
 				Destroy(t.gameObject);
 
 
 			Destroy(ragdollRoot.gameObject);
 			Destroy(ragdollRoot.gameObject);
@@ -285,7 +285,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		public Rigidbody GetRigidbody (string boneName) {
 		public Rigidbody GetRigidbody (string boneName) {
-			var bone = skeleton.FindBone(boneName);
+			Bone bone = skeleton.FindBone(boneName);
 			return (bone != null && boneTable.ContainsKey(bone)) ? boneTable[bone].GetComponent<Rigidbody>() : null;
 			return (bone != null && boneTable.ContainsKey(bone)) ? boneTable[bone].GetComponent<Rigidbody>() : null;
 		}
 		}
 		#endregion
 		#endregion
@@ -295,7 +295,7 @@ namespace Spine.Unity.Examples {
 			if (stopBoneNames.Contains(boneName))
 			if (stopBoneNames.Contains(boneName))
 				return;
 				return;
 
 
-			var boneGameObject = new GameObject(boneName);
+			GameObject boneGameObject = new GameObject(boneName);
 			boneGameObject.layer = colliderLayer;
 			boneGameObject.layer = colliderLayer;
 			Transform t = boneGameObject.transform;
 			Transform t = boneGameObject.transform;
 			boneTable.Add(b, t);
 			boneTable.Add(b, t);
@@ -305,19 +305,19 @@ namespace Spine.Unity.Examples {
 			t.localRotation = Quaternion.Euler(0, 0, b.WorldRotationX - b.ShearX);
 			t.localRotation = Quaternion.Euler(0, 0, b.WorldRotationX - b.ShearX);
 			t.localScale = new Vector3(b.WorldScaleX, b.WorldScaleY, 1);
 			t.localScale = new Vector3(b.WorldScaleX, b.WorldScaleY, 1);
 
 
-			var colliders = AttachBoundingBoxRagdollColliders(b);
+			List<Collider> colliders = AttachBoundingBoxRagdollColliders(b);
 			if (colliders.Count == 0) {
 			if (colliders.Count == 0) {
 				float length = b.Data.Length;
 				float length = b.Data.Length;
 				if (length == 0) {
 				if (length == 0) {
-					var ball = boneGameObject.AddComponent<SphereCollider>();
+					SphereCollider ball = boneGameObject.AddComponent<SphereCollider>();
 					ball.radius = thickness * 0.5f;
 					ball.radius = thickness * 0.5f;
 				} else {
 				} else {
-					var box = boneGameObject.AddComponent<BoxCollider>();
+					BoxCollider box = boneGameObject.AddComponent<BoxCollider>();
 					box.size = new Vector3(length, thickness, thickness);
 					box.size = new Vector3(length, thickness, thickness);
 					box.center = new Vector3(length * 0.5f, 0);
 					box.center = new Vector3(length * 0.5f, 0);
 				}
 				}
 			}
 			}
-			var rb = boneGameObject.AddComponent<Rigidbody>();
+			Rigidbody rb = boneGameObject.AddComponent<Rigidbody>();
 			rb.constraints = RigidbodyConstraints.FreezePositionZ;
 			rb.constraints = RigidbodyConstraints.FreezePositionZ;
 
 
 			foreach (Bone child in b.Children)
 			foreach (Bone child in b.Children)
@@ -329,14 +329,14 @@ namespace Spine.Unity.Examples {
 			bool parentFlipY;
 			bool parentFlipY;
 			GetStartBoneParentFlipState(out parentFlipX, out parentFlipY);
 			GetStartBoneParentFlipState(out parentFlipX, out parentFlipY);
 
 
-			foreach (var pair in boneTable) {
-				var b = pair.Key;
-				var t = pair.Value;
+			foreach (KeyValuePair<Bone, Transform> pair in boneTable) {
+				Bone b = pair.Key;
+				Transform t = pair.Value;
 				bool isStartingBone = b == StartingBone;
 				bool isStartingBone = b == StartingBone;
-				var parentBone = b.Parent;
+				Bone parentBone = b.Parent;
 				Transform parentTransform = isStartingBone ? ragdollRoot : boneTable[parentBone];
 				Transform parentTransform = isStartingBone ? ragdollRoot : boneTable[parentBone];
 				if (!isStartingBone) {
 				if (!isStartingBone) {
-					var parentBoneFlip = boneFlipTable[parentBone];
+					BoneFlipEntry parentBoneFlip = boneFlipTable[parentBone];
 					parentFlipX = parentBoneFlip.flipX;
 					parentFlipX = parentBoneFlip.flipX;
 					parentFlipY = parentBoneFlip.flipY;
 					parentFlipY = parentBoneFlip.flipY;
 				}
 				}
@@ -397,7 +397,7 @@ namespace Spine.Unity.Examples {
 		void GetStartBoneParentFlipState (out bool parentFlipX, out bool parentFlipY) {
 		void GetStartBoneParentFlipState (out bool parentFlipX, out bool parentFlipY) {
 			parentFlipX = skeleton.ScaleX < 0;
 			parentFlipX = skeleton.ScaleX < 0;
 			parentFlipY = skeleton.ScaleY < 0;
 			parentFlipY = skeleton.ScaleY < 0;
-			var parent = this.StartingBone == null ? null : this.StartingBone.Parent;
+			Bone parent = this.StartingBone == null ? null : this.StartingBone.Parent;
 			while (parent != null) {
 			while (parent != null) {
 				parentFlipX ^= parent.ScaleX < 0;
 				parentFlipX ^= parent.ScaleX < 0;
 				parentFlipY ^= parent.ScaleY < 0;
 				parentFlipY ^= parent.ScaleY < 0;
@@ -407,25 +407,25 @@ namespace Spine.Unity.Examples {
 
 
 		List<Collider> AttachBoundingBoxRagdollColliders (Bone b) {
 		List<Collider> AttachBoundingBoxRagdollColliders (Bone b) {
 			const string AttachmentNameMarker = "ragdoll";
 			const string AttachmentNameMarker = "ragdoll";
-			var colliders = new List<Collider>();
+			List<Collider> colliders = new List<Collider>();
 
 
 			Transform t = boneTable[b];
 			Transform t = boneTable[b];
 			GameObject go = t.gameObject;
 			GameObject go = t.gameObject;
-			var skin = skeleton.Skin ?? skeleton.Data.DefaultSkin;
+			Skin skin = skeleton.Skin ?? skeleton.Data.DefaultSkin;
 
 
-			var skinEntries = new List<Skin.SkinEntry>();
+			List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 			foreach (Slot s in skeleton.Slots) {
 			foreach (Slot s in skeleton.Slots) {
 				if (s.Bone == b) {
 				if (s.Bone == b) {
 					skin.GetAttachments(skeleton.Slots.IndexOf(s), skinEntries);
 					skin.GetAttachments(skeleton.Slots.IndexOf(s), skinEntries);
 
 
-					foreach (var entry in skinEntries) {
-						var bbAttachment = entry.Attachment as BoundingBoxAttachment;
+					foreach (Skin.SkinEntry entry in skinEntries) {
+						BoundingBoxAttachment bbAttachment = entry.Attachment as BoundingBoxAttachment;
 						if (bbAttachment != null) {
 						if (bbAttachment != null) {
 							if (!entry.Name.ToLower().Contains(AttachmentNameMarker))
 							if (!entry.Name.ToLower().Contains(AttachmentNameMarker))
 								continue;
 								continue;
 
 
-							var bbCollider = go.AddComponent<BoxCollider>();
-							var bounds = SkeletonUtility.GetBoundingBoxBounds(bbAttachment, thickness);
+							BoxCollider bbCollider = go.AddComponent<BoxCollider>();
+							Bounds bounds = SkeletonUtility.GetBoundingBoxBounds(bbAttachment, thickness);
 							bbCollider.center = bounds.center;
 							bbCollider.center = bounds.center;
 							bbCollider.size = bounds.size;
 							bbCollider.size = bounds.size;
 							colliders.Add(bbCollider);
 							colliders.Add(bbCollider);

+ 33 - 33
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonRagdoll2D.cs

@@ -116,7 +116,7 @@ namespace Spine.Unity.Examples {
 				if (!isActive)
 				if (!isActive)
 					return new Rigidbody2D[0];
 					return new Rigidbody2D[0];
 
 
-				var rigidBodies = new Rigidbody2D[boneTable.Count];
+				Rigidbody2D[] rigidBodies = new Rigidbody2D[boneTable.Count];
 				int i = 0;
 				int i = 0;
 				foreach (Transform t in boneTable.Values) {
 				foreach (Transform t in boneTable.Values) {
 					rigidBodies[i] = t.GetComponent<Rigidbody2D>();
 					rigidBodies[i] = t.GetComponent<Rigidbody2D>();
@@ -142,10 +142,10 @@ namespace Spine.Unity.Examples {
 			RootRigidbody = boneTable[startingBone].GetComponent<Rigidbody2D>();
 			RootRigidbody = boneTable[startingBone].GetComponent<Rigidbody2D>();
 			RootRigidbody.isKinematic = pinStartBone;
 			RootRigidbody.isKinematic = pinStartBone;
 			RootRigidbody.mass = rootMass;
 			RootRigidbody.mass = rootMass;
-			var boneColliders = new List<Collider2D>();
-			foreach (var pair in boneTable) {
-				var b = pair.Key;
-				var t = pair.Value;
+			List<Collider2D> boneColliders = new List<Collider2D>();
+			foreach (KeyValuePair<Bone, Transform> pair in boneTable) {
+				Bone b = pair.Key;
+				Transform t = pair.Value;
 				Transform parentTransform;
 				Transform parentTransform;
 				boneColliders.Add(t.GetComponent<Collider2D>());
 				boneColliders.Add(t.GetComponent<Collider2D>());
 				if (b == startingBone) {
 				if (b == startingBone) {
@@ -165,9 +165,9 @@ namespace Spine.Unity.Examples {
 				}
 				}
 
 
 				// Add joint and attach to parent.
 				// Add joint and attach to parent.
-				var rbParent = parentTransform.GetComponent<Rigidbody2D>();
+				Rigidbody2D rbParent = parentTransform.GetComponent<Rigidbody2D>();
 				if (rbParent != null) {
 				if (rbParent != null) {
-					var joint = t.gameObject.AddComponent<HingeJoint2D>();
+					HingeJoint2D joint = t.gameObject.AddComponent<HingeJoint2D>();
 					joint.connectedBody = rbParent;
 					joint.connectedBody = rbParent;
 					Vector3 localPos = parentTransform.InverseTransformPoint(t.position);
 					Vector3 localPos = parentTransform.InverseTransformPoint(t.position);
 					joint.connectedAnchor = localPos;
 					joint.connectedAnchor = localPos;
@@ -203,10 +203,10 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			// Destroy existing override-mode SkeletonUtility bones.
 			// Destroy existing override-mode SkeletonUtility bones.
-			var utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
+			SkeletonUtilityBone[] utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
 			if (utilityBones.Length > 0) {
 			if (utilityBones.Length > 0) {
-				var destroyedUtilityBoneNames = new List<string>();
-				foreach (var ub in utilityBones) {
+				List<string> destroyedUtilityBoneNames = new List<string>();
+				foreach (SkeletonUtilityBone ub in utilityBones) {
 					if (ub.mode == SkeletonUtilityBone.Mode.Override) {
 					if (ub.mode == SkeletonUtilityBone.Mode.Override) {
 						destroyedUtilityBoneNames.Add(ub.gameObject.name);
 						destroyedUtilityBoneNames.Add(ub.gameObject.name);
 						Destroy(ub.gameObject);
 						Destroy(ub.gameObject);
@@ -226,13 +226,13 @@ namespace Spine.Unity.Examples {
 
 
 			// Disable skeleton constraints.
 			// Disable skeleton constraints.
 			if (disableIK) {
 			if (disableIK) {
-				var ikConstraints = skeleton.IkConstraints;
+				ExposedList<IkConstraint> ikConstraints = skeleton.IkConstraints;
 				for (int i = 0, n = ikConstraints.Count; i < n; i++)
 				for (int i = 0, n = ikConstraints.Count; i < n; i++)
 					ikConstraints.Items[i].Mix = 0;
 					ikConstraints.Items[i].Mix = 0;
 			}
 			}
 
 
 			if (disableOtherConstraints) {
 			if (disableOtherConstraints) {
-				var transformConstraints = skeleton.TransformConstraints;
+				ExposedList<TransformConstraint> transformConstraints = skeleton.TransformConstraints;
 				for (int i = 0, n = transformConstraints.Count; i < n; i++) {
 				for (int i = 0, n = transformConstraints.Count; i < n; i++) {
 					transformConstraints.Items[i].MixRotate = 0;
 					transformConstraints.Items[i].MixRotate = 0;
 					transformConstraints.Items[i].MixScaleX = 0;
 					transformConstraints.Items[i].MixScaleX = 0;
@@ -242,7 +242,7 @@ namespace Spine.Unity.Examples {
 					transformConstraints.Items[i].MixY = 0;
 					transformConstraints.Items[i].MixY = 0;
 				}
 				}
 
 
-				var pathConstraints = skeleton.PathConstraints;
+				ExposedList<PathConstraint> pathConstraints = skeleton.PathConstraints;
 				for (int i = 0, n = pathConstraints.Count; i < n; i++) {
 				for (int i = 0, n = pathConstraints.Count; i < n; i++) {
 					pathConstraints.Items[i].MixRotate = 0;
 					pathConstraints.Items[i].MixRotate = 0;
 					pathConstraints.Items[i].MixX = 0;
 					pathConstraints.Items[i].MixX = 0;
@@ -287,7 +287,7 @@ namespace Spine.Unity.Examples {
 		/// <summary>Removes the ragdoll instance and effect from the animated skeleton.</summary>
 		/// <summary>Removes the ragdoll instance and effect from the animated skeleton.</summary>
 		public void Remove () {
 		public void Remove () {
 			isActive = false;
 			isActive = false;
-			foreach (var t in boneTable.Values)
+			foreach (Transform t in boneTable.Values)
 				Destroy(t.gameObject);
 				Destroy(t.gameObject);
 
 
 			Destroy(ragdollRoot.gameObject);
 			Destroy(ragdollRoot.gameObject);
@@ -296,7 +296,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		public Rigidbody2D GetRigidbody (string boneName) {
 		public Rigidbody2D GetRigidbody (string boneName) {
-			var bone = skeleton.FindBone(boneName);
+			Bone bone = skeleton.FindBone(boneName);
 			return (bone != null && boneTable.ContainsKey(bone)) ? boneTable[bone].GetComponent<Rigidbody2D>() : null;
 			return (bone != null && boneTable.ContainsKey(bone)) ? boneTable[bone].GetComponent<Rigidbody2D>() : null;
 		}
 		}
 		#endregion
 		#endregion
@@ -307,7 +307,7 @@ namespace Spine.Unity.Examples {
 			if (stopBoneNames.Contains(boneName))
 			if (stopBoneNames.Contains(boneName))
 				return;
 				return;
 
 
-			var boneGameObject = new GameObject(boneName);
+			GameObject boneGameObject = new GameObject(boneName);
 			boneGameObject.layer = this.colliderLayer;
 			boneGameObject.layer = this.colliderLayer;
 			Transform t = boneGameObject.transform;
 			Transform t = boneGameObject.transform;
 			boneTable.Add(b, t);
 			boneTable.Add(b, t);
@@ -317,20 +317,20 @@ namespace Spine.Unity.Examples {
 			t.localRotation = Quaternion.Euler(0, 0, b.WorldRotationX - b.ShearX);
 			t.localRotation = Quaternion.Euler(0, 0, b.WorldRotationX - b.ShearX);
 			t.localScale = new Vector3(b.WorldScaleX, b.WorldScaleY, 1);
 			t.localScale = new Vector3(b.WorldScaleX, b.WorldScaleY, 1);
 
 
-			var colliders = AttachBoundingBoxRagdollColliders(b, boneGameObject, skeleton, this.gravityScale);
+			List<Collider2D> colliders = AttachBoundingBoxRagdollColliders(b, boneGameObject, skeleton, this.gravityScale);
 			if (colliders.Count == 0) {
 			if (colliders.Count == 0) {
 				float length = b.Data.Length;
 				float length = b.Data.Length;
 				if (length == 0) {
 				if (length == 0) {
-					var circle = boneGameObject.AddComponent<CircleCollider2D>();
+					CircleCollider2D circle = boneGameObject.AddComponent<CircleCollider2D>();
 					circle.radius = thickness * 0.5f;
 					circle.radius = thickness * 0.5f;
 				} else {
 				} else {
-					var box = boneGameObject.AddComponent<BoxCollider2D>();
+					BoxCollider2D box = boneGameObject.AddComponent<BoxCollider2D>();
 					box.size = new Vector2(length, thickness);
 					box.size = new Vector2(length, thickness);
 					box.offset = new Vector2(length * 0.5f, 0); // box.center in UNITY_4
 					box.offset = new Vector2(length * 0.5f, 0); // box.center in UNITY_4
 				}
 				}
 			}
 			}
 
 
-			var rb = boneGameObject.GetComponent<Rigidbody2D>();
+			Rigidbody2D rb = boneGameObject.GetComponent<Rigidbody2D>();
 			if (rb == null) rb = boneGameObject.AddComponent<Rigidbody2D>();
 			if (rb == null) rb = boneGameObject.AddComponent<Rigidbody2D>();
 			rb.gravityScale = this.gravityScale;
 			rb.gravityScale = this.gravityScale;
 
 
@@ -342,17 +342,17 @@ namespace Spine.Unity.Examples {
 		void UpdateSpineSkeleton (ISkeletonAnimation animatedSkeleton) {
 		void UpdateSpineSkeleton (ISkeletonAnimation animatedSkeleton) {
 			bool parentFlipX;
 			bool parentFlipX;
 			bool parentFlipY;
 			bool parentFlipY;
-			var startingBone = this.StartingBone;
+			Bone startingBone = this.StartingBone;
 			GetStartBoneParentFlipState(out parentFlipX, out parentFlipY);
 			GetStartBoneParentFlipState(out parentFlipX, out parentFlipY);
 
 
-			foreach (var pair in boneTable) {
-				var b = pair.Key;
-				var t = pair.Value;
+			foreach (KeyValuePair<Bone, Transform> pair in boneTable) {
+				Bone b = pair.Key;
+				Transform t = pair.Value;
 				bool isStartingBone = (b == startingBone);
 				bool isStartingBone = (b == startingBone);
-				var parentBone = b.Parent;
+				Bone parentBone = b.Parent;
 				Transform parentTransform = isStartingBone ? ragdollRoot : boneTable[parentBone];
 				Transform parentTransform = isStartingBone ? ragdollRoot : boneTable[parentBone];
 				if (!isStartingBone) {
 				if (!isStartingBone) {
-					var parentBoneFlip = boneFlipTable[parentBone];
+					BoneFlipEntry parentBoneFlip = boneFlipTable[parentBone];
 					parentFlipX = parentBoneFlip.flipX;
 					parentFlipX = parentBoneFlip.flipX;
 					parentFlipY = parentBoneFlip.flipY;
 					parentFlipY = parentBoneFlip.flipY;
 				}
 				}
@@ -414,7 +414,7 @@ namespace Spine.Unity.Examples {
 		void GetStartBoneParentFlipState (out bool parentFlipX, out bool parentFlipY) {
 		void GetStartBoneParentFlipState (out bool parentFlipX, out bool parentFlipY) {
 			parentFlipX = skeleton.ScaleX < 0;
 			parentFlipX = skeleton.ScaleX < 0;
 			parentFlipY = skeleton.ScaleY < 0;
 			parentFlipY = skeleton.ScaleY < 0;
-			var parent = this.StartingBone == null ? null : this.StartingBone.Parent;
+			Bone parent = this.StartingBone == null ? null : this.StartingBone.Parent;
 			while (parent != null) {
 			while (parent != null) {
 				parentFlipX ^= parent.ScaleX < 0;
 				parentFlipX ^= parent.ScaleX < 0;
 				parentFlipY ^= parent.ScaleY < 0;
 				parentFlipY ^= parent.ScaleY < 0;
@@ -424,23 +424,23 @@ namespace Spine.Unity.Examples {
 
 
 		static List<Collider2D> AttachBoundingBoxRagdollColliders (Bone b, GameObject go, Skeleton skeleton, float gravityScale) {
 		static List<Collider2D> AttachBoundingBoxRagdollColliders (Bone b, GameObject go, Skeleton skeleton, float gravityScale) {
 			const string AttachmentNameMarker = "ragdoll";
 			const string AttachmentNameMarker = "ragdoll";
-			var colliders = new List<Collider2D>();
-			var skin = skeleton.Skin ?? skeleton.Data.DefaultSkin;
+			List<Collider2D> colliders = new List<Collider2D>();
+			Skin skin = skeleton.Skin ?? skeleton.Data.DefaultSkin;
 
 
-			var skinEntries = new List<Skin.SkinEntry>();
+			List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 			foreach (Slot slot in skeleton.Slots) {
 			foreach (Slot slot in skeleton.Slots) {
 				if (slot.Bone == b) {
 				if (slot.Bone == b) {
 					skin.GetAttachments(skeleton.Slots.IndexOf(slot), skinEntries);
 					skin.GetAttachments(skeleton.Slots.IndexOf(slot), skinEntries);
 
 
 					bool bbAttachmentAdded = false;
 					bool bbAttachmentAdded = false;
-					foreach (var entry in skinEntries) {
-						var bbAttachment = entry.Attachment as BoundingBoxAttachment;
+					foreach (Skin.SkinEntry entry in skinEntries) {
+						BoundingBoxAttachment bbAttachment = entry.Attachment as BoundingBoxAttachment;
 						if (bbAttachment != null) {
 						if (bbAttachment != null) {
 							if (!entry.Name.ToLower().Contains(AttachmentNameMarker))
 							if (!entry.Name.ToLower().Contains(AttachmentNameMarker))
 								continue;
 								continue;
 
 
 							bbAttachmentAdded = true;
 							bbAttachmentAdded = true;
-							var bbCollider = SkeletonUtility.AddBoundingBoxAsComponent(bbAttachment, slot, go, isTrigger: false);
+							PolygonCollider2D bbCollider = SkeletonUtility.AddBoundingBoxAsComponent(bbAttachment, slot, go, isTrigger: false);
 							colliders.Add(bbCollider);
 							colliders.Add(bbCollider);
 						}
 						}
 					}
 					}

+ 9 - 9
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonUtilityKinematicShadow.cs

@@ -60,7 +60,7 @@ namespace Spine.Unity.Examples {
 			Destroy(shadowRoot.GetComponent<SkeletonUtilityKinematicShadow>());
 			Destroy(shadowRoot.GetComponent<SkeletonUtilityKinematicShadow>());
 
 
 			// Prepare shadow gameObject's properties.
 			// Prepare shadow gameObject's properties.
-			var shadowRootTransform = shadowRoot.transform;
+			Transform shadowRootTransform = shadowRoot.transform;
 			shadowRootTransform.position = transform.position;
 			shadowRootTransform.position = transform.position;
 			shadowRootTransform.rotation = transform.rotation;
 			shadowRootTransform.rotation = transform.rotation;
 
 
@@ -79,19 +79,19 @@ namespace Spine.Unity.Examples {
 			if (hideShadow)
 			if (hideShadow)
 				shadowRoot.hideFlags = HideFlags.HideInHierarchy;
 				shadowRoot.hideFlags = HideFlags.HideInHierarchy;
 
 
-			var shadowJoints = shadowRoot.GetComponentsInChildren<Joint>();
+			Joint[] shadowJoints = shadowRoot.GetComponentsInChildren<Joint>();
 			foreach (Joint j in shadowJoints)
 			foreach (Joint j in shadowJoints)
 				j.connectedAnchor *= scale;
 				j.connectedAnchor *= scale;
 
 
 			// Build list of bone pairs (matches shadow transforms with bone transforms)
 			// Build list of bone pairs (matches shadow transforms with bone transforms)
-			var bones = GetComponentsInChildren<SkeletonUtilityBone>();
-			var shadowBones = shadowRoot.GetComponentsInChildren<SkeletonUtilityBone>();
-			foreach (var b in bones) {
+			SkeletonUtilityBone[] bones = GetComponentsInChildren<SkeletonUtilityBone>();
+			SkeletonUtilityBone[] shadowBones = shadowRoot.GetComponentsInChildren<SkeletonUtilityBone>();
+			foreach (SkeletonUtilityBone b in bones) {
 				if (b.gameObject == this.gameObject)
 				if (b.gameObject == this.gameObject)
 					continue;
 					continue;
 
 
 				System.Type checkType = (physicsSystem == PhysicsSystem.Physics2D) ? typeof(Rigidbody2D) : typeof(Rigidbody);
 				System.Type checkType = (physicsSystem == PhysicsSystem.Physics2D) ? typeof(Rigidbody2D) : typeof(Rigidbody);
-				foreach (var sb in shadowBones) {
+				foreach (SkeletonUtilityBone sb in shadowBones) {
 					if (sb.GetComponent(checkType) != null && sb.boneName == b.boneName) {
 					if (sb.GetComponent(checkType) != null && sb.boneName == b.boneName) {
 						shadowTable.Add(new TransformPair {
 						shadowTable.Add(new TransformPair {
 							dest = b.transform,
 							dest = b.transform,
@@ -118,17 +118,17 @@ namespace Spine.Unity.Examples {
 
 
 		void FixedUpdate () {
 		void FixedUpdate () {
 			if (physicsSystem == PhysicsSystem.Physics2D) {
 			if (physicsSystem == PhysicsSystem.Physics2D) {
-				var shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody2D>();
+				Rigidbody2D shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody2D>();
 				shadowRootRigidbody.MovePosition(transform.position);
 				shadowRootRigidbody.MovePosition(transform.position);
 				shadowRootRigidbody.MoveRotation(transform.rotation.eulerAngles.z);
 				shadowRootRigidbody.MoveRotation(transform.rotation.eulerAngles.z);
 			} else {
 			} else {
-				var shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody>();
+				Rigidbody shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody>();
 				shadowRootRigidbody.MovePosition(transform.position);
 				shadowRootRigidbody.MovePosition(transform.position);
 				shadowRootRigidbody.MoveRotation(transform.rotation);
 				shadowRootRigidbody.MoveRotation(transform.rotation);
 			}
 			}
 
 
 			for (int i = 0, n = shadowTable.Count; i < n; i++) {
 			for (int i = 0, n = shadowTable.Count; i < n; i++) {
-				var pair = shadowTable[i];
+				TransformPair pair = shadowTable[i];
 				pair.dest.localPosition = pair.src.localPosition;
 				pair.dest.localPosition = pair.src.localPosition;
 				pair.dest.localRotation = pair.src.localRotation;
 				pair.dest.localRotation = pair.src.localRotation;
 			}
 			}

+ 7 - 7
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SpineEventUnityHandler.cs

@@ -54,14 +54,14 @@ namespace Spine.Unity.Prototyping {
 			if (animationStateComponent == null)
 			if (animationStateComponent == null)
 				animationStateComponent = skeletonComponent as IAnimationStateComponent;
 				animationStateComponent = skeletonComponent as IAnimationStateComponent;
 			if (animationStateComponent == null) return;
 			if (animationStateComponent == null) return;
-			var skeleton = skeletonComponent.Skeleton;
+			Skeleton skeleton = skeletonComponent.Skeleton;
 			if (skeleton == null) return;
 			if (skeleton == null) return;
 
 
 
 
-			var skeletonData = skeleton.Data;
-			var state = animationStateComponent.AnimationState;
-			foreach (var ep in events) {
-				var eventData = skeletonData.FindEvent(ep.spineEvent);
+			SkeletonData skeletonData = skeleton.Data;
+			AnimationState state = animationStateComponent.AnimationState;
+			foreach (EventPair ep in events) {
+				EventData eventData = skeletonData.FindEvent(ep.spineEvent);
 				ep.eventDelegate = ep.eventDelegate ?? delegate (TrackEntry trackEntry, Event e) { if (e.Data == eventData) ep.unityHandler.Invoke(); };
 				ep.eventDelegate = ep.eventDelegate ?? delegate (TrackEntry trackEntry, Event e) { if (e.Data == eventData) ep.unityHandler.Invoke(); };
 				state.Event += ep.eventDelegate;
 				state.Event += ep.eventDelegate;
 			}
 			}
@@ -71,8 +71,8 @@ namespace Spine.Unity.Prototyping {
 			if (animationStateComponent == null) animationStateComponent = GetComponent<IAnimationStateComponent>();
 			if (animationStateComponent == null) animationStateComponent = GetComponent<IAnimationStateComponent>();
 			if (animationStateComponent.IsNullOrDestroyed()) return;
 			if (animationStateComponent.IsNullOrDestroyed()) return;
 
 
-			var state = animationStateComponent.AnimationState;
-			foreach (var ep in events) {
+			AnimationState state = animationStateComponent.AnimationState;
+			foreach (EventPair ep in events) {
 				if (ep.eventDelegate != null) state.Event -= ep.eventDelegate;
 				if (ep.eventDelegate != null) state.Event -= ep.eventDelegate;
 				ep.eventDelegate = null;
 				ep.eventDelegate = null;
 			}
 			}

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/SpawnFromSkeletonDataExample.cs

@@ -46,9 +46,9 @@ namespace Spine.Unity.Examples {
 			skeletonDataAsset.GetSkeletonData(false); // Preload SkeletonDataAsset.
 			skeletonDataAsset.GetSkeletonData(false); // Preload SkeletonDataAsset.
 			yield return new WaitForSeconds(1f); // Pretend stuff is happening.
 			yield return new WaitForSeconds(1f); // Pretend stuff is happening.
 
 
-			var spineAnimation = skeletonDataAsset.GetSkeletonData(false).FindAnimation(startingAnimation);
+			Animation spineAnimation = skeletonDataAsset.GetSkeletonData(false).FindAnimation(startingAnimation);
 			for (int i = 0; i < count; i++) {
 			for (int i = 0; i < count; i++) {
-				var sa = SkeletonAnimation.NewSkeletonAnimationGameObject(skeletonDataAsset); // Spawn a new SkeletonAnimation GameObject.
+				SkeletonAnimation sa = SkeletonAnimation.NewSkeletonAnimationGameObject(skeletonDataAsset); // Spawn a new SkeletonAnimation GameObject.
 				DoExtraStuff(sa, spineAnimation); // optional stuff for fun.
 				DoExtraStuff(sa, spineAnimation); // optional stuff for fun.
 				sa.gameObject.name = i.ToString();
 				sa.gameObject.name = i.ToString();
 				yield return new WaitForSeconds(1f / 8f);
 				yield return new WaitForSeconds(1f / 8f);

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/SpawnSkeletonGraphicExample.cs

@@ -48,7 +48,7 @@ namespace Spine.Unity.Examples {
 			skeletonDataAsset.GetSkeletonData(false); // Preload SkeletonDataAsset.
 			skeletonDataAsset.GetSkeletonData(false); // Preload SkeletonDataAsset.
 			yield return new WaitForSeconds(1f); // Pretend stuff is happening.
 			yield return new WaitForSeconds(1f); // Pretend stuff is happening.
 
 
-			var sg = SkeletonGraphic.NewSkeletonGraphicGameObject(skeletonDataAsset, this.transform, skeletonGraphicMaterial); // Spawn a new SkeletonGraphic GameObject.
+			SkeletonGraphic sg = SkeletonGraphic.NewSkeletonGraphicGameObject(skeletonDataAsset, this.transform, skeletonGraphicMaterial); // Spawn a new SkeletonGraphic GameObject.
 			sg.gameObject.name = "SkeletonGraphic Instance";
 			sg.gameObject.name = "SkeletonGraphic Instance";
 
 
 			// Extra Stuff
 			// Extra Stuff

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/SpineGauge.cs

@@ -53,7 +53,7 @@ namespace Spine.Unity.Examples {
 
 
 		public void SetGaugePercent (float percent) {
 		public void SetGaugePercent (float percent) {
 			if (skeletonRenderer == null) return;
 			if (skeletonRenderer == null) return;
-			var skeleton = skeletonRenderer.skeleton; if (skeleton == null) return;
+			Skeleton skeleton = skeletonRenderer.skeleton; if (skeleton == null) return;
 
 
 			fillAnimation.Animation.Apply(skeleton, 0, percent, false, null, 1f, MixBlend.Setup, MixDirection.In);
 			fillAnimation.Animation.Apply(skeleton, 0, percent, false, null, 1f, MixBlend.Setup, MixDirection.In);
 			skeleton.UpdateWorldTransform();
 			skeleton.UpdateWorldTransform();

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Spineboy.cs

@@ -37,7 +37,7 @@ namespace Spine.Unity.Examples {
 
 
 		public void Start () {
 		public void Start () {
 			skeletonAnimation = GetComponent<SkeletonAnimation>(); // Get the SkeletonAnimation component for the GameObject this script is attached to.
 			skeletonAnimation = GetComponent<SkeletonAnimation>(); // Get the SkeletonAnimation component for the GameObject this script is attached to.
-			var animationState = skeletonAnimation.AnimationState;
+			AnimationState animationState = skeletonAnimation.AnimationState;
 
 
 			animationState.Event += HandleEvent; ; // Call our method any time an animation fires an event.
 			animationState.Event += HandleEvent; ; // Call our method any time an animation fires an event.
 			animationState.End += (entry) => Debug.Log("start: " + entry.TrackIndex); // A lambda can be used for the callback instead of a method.
 			animationState.End += (entry) => Debug.Log("start: " + entry.TrackIndex); // A lambda can be used for the callback instead of a method.

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/SpineboyBodyTilt.cs

@@ -51,8 +51,8 @@ namespace Spine.Unity.Examples {
 		Bone hipBone, headBone;
 		Bone hipBone, headBone;
 
 
 		void Start () {
 		void Start () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
-			var skeleton = skeletonAnimation.Skeleton;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			Skeleton skeleton = skeletonAnimation.Skeleton;
 
 
 			hipBone = skeleton.FindBone(hip);
 			hipBone = skeleton.FindBone(hip);
 			headBone = skeleton.FindBone(head);
 			headBone = skeleton.FindBone(head);

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/SpineboyFacialExpression.cs

@@ -55,8 +55,8 @@ namespace Spine.Unity.Examples {
 		public float shockTimer = 0f;
 		public float shockTimer = 0f;
 
 
 		void Start () {
 		void Start () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
-			var skeleton = skeletonAnimation.Skeleton;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			Skeleton skeleton = skeletonAnimation.Skeleton;
 			eyeSlot = skeleton.FindSlot(eyeSlotName);
 			eyeSlot = skeleton.FindSlot(eyeSlotName);
 			mouthSlot = skeleton.FindSlot(mouthSlotName);
 			mouthSlot = skeleton.FindSlot(mouthSlotName);
 
 

+ 4 - 4
spine-unity/Assets/Spine Examples/Scripts/SpineboyFootplanter.cs

@@ -108,7 +108,7 @@ namespace Spine.Unity.Examples {
 				float strideSign = Mathf.Sign(strideSignedSize);
 				float strideSign = Mathf.Sign(strideSignedSize);
 				float strideSize = (Mathf.Abs(strideSignedSize));
 				float strideSize = (Mathf.Abs(strideSignedSize));
 
 
-				var movement = strideSign > 0 ? forwardMovement : backwardMovement;
+				FootMovement movement = strideSign > 0 ? forwardMovement : backwardMovement;
 
 
 				worldPos.x = Mathf.Lerp(worldPosPrev.x, worldPosNext.x, movement.xMoveCurve.Evaluate(lerp));
 				worldPos.x = Mathf.Lerp(worldPosPrev.x, worldPosNext.x, movement.xMoveCurve.Evaluate(lerp));
 				float groundLevel = Mathf.Lerp(worldPosPrev.y, worldPosNext.y, lerp);
 				float groundLevel = Mathf.Lerp(worldPosPrev.y, worldPosNext.y, lerp);
@@ -126,7 +126,7 @@ namespace Spine.Unity.Examples {
 			}
 			}
 
 
 			public static float GetNewDisplacement (float otherLegDisplacementFromCenter, float comfyDistance, float minimumFootDistanceX, float maxNewStepDisplacement, FootMovement forwardMovement, FootMovement backwardMovement) {
 			public static float GetNewDisplacement (float otherLegDisplacementFromCenter, float comfyDistance, float minimumFootDistanceX, float maxNewStepDisplacement, FootMovement forwardMovement, FootMovement backwardMovement) {
-				var movement = Mathf.Sign(otherLegDisplacementFromCenter) < 0 ? forwardMovement : backwardMovement;
+				FootMovement movement = Mathf.Sign(otherLegDisplacementFromCenter) < 0 ? forwardMovement : backwardMovement;
 				float randomCompensate = Random.Range(movement.minDistanceCompensate, movement.maxDistanceCompensate);
 				float randomCompensate = Random.Range(movement.minDistanceCompensate, movement.maxDistanceCompensate);
 
 
 				float newDisplacement = (otherLegDisplacementFromCenter * randomCompensate);
 				float newDisplacement = (otherLegDisplacementFromCenter * randomCompensate);
@@ -142,7 +142,7 @@ namespace Spine.Unity.Examples {
 
 
 		void Start () {
 		void Start () {
 			Time.timeScale = timeScale;
 			Time.timeScale = timeScale;
-			var tpos = transform.position;
+			Vector3 tpos = transform.position;
 
 
 			// Default starting positions.
 			// Default starting positions.
 			nearFoot.worldPos = tpos;
 			nearFoot.worldPos = tpos;
@@ -153,7 +153,7 @@ namespace Spine.Unity.Examples {
 			farFoot.worldPos.x += comfyDistance;
 			farFoot.worldPos.x += comfyDistance;
 			farFoot.worldPosPrev = farFoot.worldPosNext = farFoot.worldPos;
 			farFoot.worldPosPrev = farFoot.worldPosNext = farFoot.worldPos;
 
 
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
 			skeleton = skeletonAnimation.Skeleton;
 			skeleton = skeletonAnimation.Skeleton;
 
 
 			skeletonAnimation.UpdateLocal += UpdateLocal;
 			skeletonAnimation.UpdateLocal += UpdateLocal;

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/SpineboyFreeze.cs

@@ -55,10 +55,10 @@ namespace Spine.Unity.Examples {
 
 
 			particles.Stop();
 			particles.Stop();
 			particles.Clear();
 			particles.Clear();
-			var main = particles.main;
+			ParticleSystem.MainModule main = particles.main;
 			main.loop = false;
 			main.loop = false;
 
 
-			var state = skeletonAnimation.AnimationState;
+			AnimationState state = skeletonAnimation.AnimationState;
 			while (true) {
 			while (true) {
 
 
 				yield return new WaitForSeconds(1f);
 				yield return new WaitForSeconds(1f);

+ 3 - 3
spine-unity/Assets/Spine Examples/Scripts/SpineboyPole.cs

@@ -47,7 +47,7 @@ namespace Spine.Unity.Examples {
 		const float RunTimeScale = 1.5f;
 		const float RunTimeScale = 1.5f;
 
 
 		IEnumerator Start () {
 		IEnumerator Start () {
-			var state = skeletonAnimation.state;
+			AnimationState state = skeletonAnimation.state;
 
 
 			while (true) {
 			while (true) {
 				// Run phase
 				// Run phase
@@ -64,14 +64,14 @@ namespace Spine.Unity.Examples {
 				// Hit phase
 				// Hit phase
 				SetXPosition(endX);
 				SetXPosition(endX);
 				separator.enabled = true; // Enable Separator when hit
 				separator.enabled = true; // Enable Separator when hit
-				var poleTrack = state.SetAnimation(0, pole, false);
+				TrackEntry poleTrack = state.SetAnimation(0, pole, false);
 				yield return new WaitForSpineAnimationComplete(poleTrack);
 				yield return new WaitForSpineAnimationComplete(poleTrack);
 				yield return new WaitForSeconds(1f);
 				yield return new WaitForSeconds(1f);
 			}
 			}
 		}
 		}
 
 
 		void SetXPosition (float x) {
 		void SetXPosition (float x) {
-			var tp = transform.localPosition;
+			Vector3 tp = transform.localPosition;
 			tp.x = x;
 			tp.x = x;
 			transform.localPosition = tp;
 			transform.localPosition = tp;
 		}
 		}

+ 3 - 3
spine-unity/Assets/Spine Examples/Scripts/SpineboyPoleGraphic.cs

@@ -46,7 +46,7 @@ namespace Spine.Unity.Examples {
 		const float RunTimeScale = 1.5f;
 		const float RunTimeScale = 1.5f;
 
 
 		IEnumerator Start () {
 		IEnumerator Start () {
-			var state = skeletonGraphic.AnimationState;
+			AnimationState state = skeletonGraphic.AnimationState;
 
 
 			while (true) {
 			while (true) {
 				// Run phase
 				// Run phase
@@ -63,14 +63,14 @@ namespace Spine.Unity.Examples {
 				// Hit phase
 				// Hit phase
 				SetXPosition(endX);
 				SetXPosition(endX);
 				skeletonGraphic.enableSeparatorSlots = true; // Enable Separator when hit
 				skeletonGraphic.enableSeparatorSlots = true; // Enable Separator when hit
-				var poleTrack = state.SetAnimation(0, pole, false);
+				TrackEntry poleTrack = state.SetAnimation(0, pole, false);
 				yield return new WaitForSpineAnimationComplete(poleTrack);
 				yield return new WaitForSpineAnimationComplete(poleTrack);
 				yield return new WaitForSeconds(1f);
 				yield return new WaitForSeconds(1f);
 			}
 			}
 		}
 		}
 
 
 		void SetXPosition (float x) {
 		void SetXPosition (float x) {
-			var tp = transform.localPosition;
+			Vector3 tp = transform.localPosition;
 			tp.x = x;
 			tp.x = x;
 			transform.localPosition = tp;
 			transform.localPosition = tp;
 		}
 		}

+ 1 - 1
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/AnimationReferenceAssetEditor.cs

@@ -68,7 +68,7 @@ namespace Spine.Unity.Editor {
 
 
 			Animation animation = null;
 			Animation animation = null;
 			if (ThisSkeletonDataAsset != null) {
 			if (ThisSkeletonDataAsset != null) {
-				var skeletonData = ThisSkeletonDataAsset.GetSkeletonData(true);
+				SkeletonData skeletonData = ThisSkeletonDataAsset.GetSkeletonData(true);
 				if (skeletonData != null) {
 				if (skeletonData != null) {
 					animation = skeletonData.FindAnimation(animationName);
 					animation = skeletonData.FindAnimation(animationName);
 				}
 				}

+ 34 - 34
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs

@@ -260,7 +260,7 @@ namespace Spine.Unity.Editor {
 
 
 			FieldInfo nameField = typeof(AnimationReferenceAsset).GetField("animationName", BindingFlags.NonPublic | BindingFlags.Instance);
 			FieldInfo nameField = typeof(AnimationReferenceAsset).GetField("animationName", BindingFlags.NonPublic | BindingFlags.Instance);
 			FieldInfo skeletonDataAssetField = typeof(AnimationReferenceAsset).GetField("skeletonDataAsset", BindingFlags.NonPublic | BindingFlags.Instance);
 			FieldInfo skeletonDataAssetField = typeof(AnimationReferenceAsset).GetField("skeletonDataAsset", BindingFlags.NonPublic | BindingFlags.Instance);
-			foreach (var animation in targetSkeletonData.Animations) {
+			foreach (Animation animation in targetSkeletonData.Animations) {
 				string assetPath = string.Format("{0}/{1}.asset", dataPath, AssetUtility.GetPathSafeName(animation.Name));
 				string assetPath = string.Format("{0}/{1}.asset", dataPath, AssetUtility.GetPathSafeName(animation.Name));
 				AnimationReferenceAsset existingAsset = AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(assetPath);
 				AnimationReferenceAsset existingAsset = AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(assetPath);
 				if (existingAsset == null) {
 				if (existingAsset == null) {
@@ -271,7 +271,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 			}
 			}
 
 
-			var folderObject = AssetDatabase.LoadAssetAtPath(dataPath, typeof(UnityEngine.Object));
+			UnityEngine.Object folderObject = AssetDatabase.LoadAssetAtPath(dataPath, typeof(UnityEngine.Object));
 			if (folderObject != null) {
 			if (folderObject != null) {
 				Selection.activeObject = folderObject;
 				Selection.activeObject = folderObject;
 				EditorGUIUtility.PingObject(folderObject);
 				EditorGUIUtility.PingObject(folderObject);
@@ -339,7 +339,7 @@ namespace Spine.Unity.Editor {
 			using (new EditorGUILayout.HorizontalScope()) {
 			using (new EditorGUILayout.HorizontalScope()) {
 				EditorGUILayout.LabelField("SkeletonData", EditorStyles.boldLabel);
 				EditorGUILayout.LabelField("SkeletonData", EditorStyles.boldLabel);
 				if (targetSkeletonData != null) {
 				if (targetSkeletonData != null) {
-					var sd = targetSkeletonData;
+					SkeletonData sd = targetSkeletonData;
 					string m = string.Format("{8} - {0} {1}\nBones: {2}\nConstraints: \n {5} IK \n {6} Path \n {7} Transform\n\nSlots: {3}\nSkins: {4}\n\nAnimations: {9}",
 					string m = string.Format("{8} - {0} {1}\nBones: {2}\nConstraints: \n {5} IK \n {6} Path \n {7} Transform\n\nSlots: {3}\nSkins: {4}\n\nAnimations: {9}",
 						sd.Version, string.IsNullOrEmpty(sd.Version) ? "" : "export          ", sd.Bones.Count, sd.Slots.Count, sd.Skins.Count, sd.IkConstraints.Count, sd.PathConstraints.Count, sd.TransformConstraints.Count, skeletonJSON.objectReferenceValue.name, sd.Animations.Count);
 						sd.Version, string.IsNullOrEmpty(sd.Version) ? "" : "export          ", sd.Bones.Count, sd.Slots.Count, sd.Skins.Count, sd.IkConstraints.Count, sd.PathConstraints.Count, sd.TransformConstraints.Count, skeletonJSON.objectReferenceValue.name, sd.Animations.Count);
 					EditorGUILayout.LabelField(GUIContent.none, new GUIContent(Icons.info, m), GUILayout.Width(30f));
 					EditorGUILayout.LabelField(GUIContent.none, new GUIContent(Icons.info, m), GUILayout.Width(30f));
@@ -383,7 +383,7 @@ namespace Spine.Unity.Editor {
 
 
 		void HandleAtlasAssetsNulls () {
 		void HandleAtlasAssetsNulls () {
 			bool hasNulls = false;
 			bool hasNulls = false;
-			foreach (var a in targetSkeletonDataAsset.atlasAssets) {
+			foreach (AtlasAssetBase a in targetSkeletonDataAsset.atlasAssets) {
 				if (a == null) {
 				if (a == null) {
 					hasNulls = true;
 					hasNulls = true;
 					break;
 					break;
@@ -395,8 +395,8 @@ namespace Spine.Unity.Editor {
 				} else {
 				} else {
 					EditorGUILayout.HelpBox("Atlas array should not have null entries!", MessageType.Error);
 					EditorGUILayout.HelpBox("Atlas array should not have null entries!", MessageType.Error);
 					if (SpineInspectorUtility.CenteredButton(SpineInspectorUtility.TempContent("Remove null entries"))) {
 					if (SpineInspectorUtility.CenteredButton(SpineInspectorUtility.TempContent("Remove null entries"))) {
-						var trimmedAtlasAssets = new List<AtlasAssetBase>();
-						foreach (var a in targetSkeletonDataAsset.atlasAssets) {
+						List<AtlasAssetBase> trimmedAtlasAssets = new List<AtlasAssetBase>();
+						foreach (AtlasAssetBase a in targetSkeletonDataAsset.atlasAssets) {
 							if (a != null)
 							if (a != null)
 								trimmedAtlasAssets.Add(a);
 								trimmedAtlasAssets.Add(a);
 						}
 						}
@@ -483,7 +483,7 @@ namespace Spine.Unity.Editor {
 			//float fps = targetSkeletonData.Fps;
 			//float fps = targetSkeletonData.Fps;
 			//if (nonessential && fps == 0) fps = 30;
 			//if (nonessential && fps == 0) fps = 30;
 
 
-			var activeTrack = preview.ActiveTrack;
+			TrackEntry activeTrack = preview.ActiveTrack;
 			foreach (Animation animation in targetSkeletonData.Animations) {
 			foreach (Animation animation in targetSkeletonData.Animations) {
 				using (new GUILayout.HorizontalScope()) {
 				using (new GUILayout.HorizontalScope()) {
 					if (isPreviewWindowOpen) {
 					if (isPreviewWindowOpen) {
@@ -510,7 +510,7 @@ namespace Spine.Unity.Editor {
 			if (!showSlotList) return;
 			if (!showSlotList) return;
 			if (!preview.IsValid) return;
 			if (!preview.IsValid) return;
 
 
-			var defaultSkin = targetSkeletonData.DefaultSkin;
+			Skin defaultSkin = targetSkeletonData.DefaultSkin;
 			Skin skin = preview.Skeleton.Skin ?? defaultSkin;
 			Skin skin = preview.Skeleton.Skin ?? defaultSkin;
 
 
 			using (new SpineInspectorUtility.IndentScope()) {
 			using (new SpineInspectorUtility.IndentScope()) {
@@ -526,9 +526,9 @@ namespace Spine.Unity.Editor {
 					}
 					}
 				}
 				}
 
 
-				var slotAttachments = new List<Skin.SkinEntry>();
-				var defaultSkinAttachments = new List<Skin.SkinEntry>();
-				var slotsItems = preview.Skeleton.Slots.Items;
+				List<Skin.SkinEntry> slotAttachments = new List<Skin.SkinEntry>();
+				List<Skin.SkinEntry> defaultSkinAttachments = new List<Skin.SkinEntry>();
+				Slot[] slotsItems = preview.Skeleton.Slots.Items;
 				for (int i = preview.Skeleton.Slots.Count - 1; i >= 0; i--) {
 				for (int i = preview.Skeleton.Slots.Count - 1; i >= 0; i--) {
 					Slot slot = slotsItems[i];
 					Slot slot = slotsItems[i];
 					EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(slot.Data.Name, Icons.slot));
 					EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(slot.Data.Name, Icons.slot));
@@ -550,7 +550,7 @@ namespace Spine.Unity.Editor {
 							}
 							}
 
 
 							for (int a = 0; a < slotAttachments.Count; a++) {
 							for (int a = 0; a < slotAttachments.Count; a++) {
-								var skinEntry = slotAttachments[a];
+								Skin.SkinEntry skinEntry = slotAttachments[a];
 								Attachment attachment = skinEntry.Attachment;
 								Attachment attachment = skinEntry.Attachment;
 								string attachmentName = skinEntry.Name;
 								string attachmentName = skinEntry.Name;
 								bool attachmentIsFromSkin = !defaultSkinAttachments.Contains(skinEntry);
 								bool attachmentIsFromSkin = !defaultSkinAttachments.Contains(skinEntry);
@@ -627,7 +627,7 @@ namespace Spine.Unity.Editor {
 			if (skeletonJSON.objectReferenceValue == null) {
 			if (skeletonJSON.objectReferenceValue == null) {
 				warnings.Add("Missing Skeleton JSON");
 				warnings.Add("Missing Skeleton JSON");
 			} else {
 			} else {
-				var fieldValue = (TextAsset)skeletonJSON.objectReferenceValue;
+				TextAsset fieldValue = (TextAsset)skeletonJSON.objectReferenceValue;
 				string problemDescription = null;
 				string problemDescription = null;
 				if (!AssetUtility.IsSpineData(fieldValue, out compatibilityProblemInfo, ref problemDescription)) {
 				if (!AssetUtility.IsSpineData(fieldValue, out compatibilityProblemInfo, ref problemDescription)) {
 					if (problemDescription != null)
 					if (problemDescription != null)
@@ -646,8 +646,8 @@ namespace Spine.Unity.Editor {
 
 
 					if (searchForSpineAtlasAssets) {
 					if (searchForSpineAtlasAssets) {
 						bool detectedNullAtlasEntry = false;
 						bool detectedNullAtlasEntry = false;
-						var atlasList = new List<Atlas>();
-						var actualAtlasAssets = targetSkeletonDataAsset.atlasAssets;
+						List<Atlas> atlasList = new List<Atlas>();
+						AtlasAssetBase[] actualAtlasAssets = targetSkeletonDataAsset.atlasAssets;
 
 
 						for (int i = 0; i < actualAtlasAssets.Length; i++) {
 						for (int i = 0; i < actualAtlasAssets.Length; i++) {
 							if (actualAtlasAssets[i] == null) {
 							if (actualAtlasAssets[i] == null) {
@@ -665,7 +665,7 @@ namespace Spine.Unity.Editor {
 							List<string> missingPaths = null;
 							List<string> missingPaths = null;
 							if (atlasAssets.arraySize > 0) {
 							if (atlasAssets.arraySize > 0) {
 								missingPaths = AssetUtility.GetRequiredAtlasRegions(AssetDatabase.GetAssetPath(skeletonJSON.objectReferenceValue));
 								missingPaths = AssetUtility.GetRequiredAtlasRegions(AssetDatabase.GetAssetPath(skeletonJSON.objectReferenceValue));
-								foreach (var atlas in atlasList) {
+								foreach (Atlas atlas in atlasList) {
 									if (atlas == null)
 									if (atlas == null)
 										continue;
 										continue;
 									for (int i = 0; i < missingPaths.Count; i++) {
 									for (int i = 0; i < missingPaths.Count; i++) {
@@ -720,7 +720,7 @@ namespace Spine.Unity.Editor {
 				return false;
 				return false;
 
 
 			for (int i = 0; i < atlasAssets.arraySize; i++) {
 			for (int i = 0; i < atlasAssets.arraySize; i++) {
-				var prop = atlasAssets.GetArrayElementAtIndex(i);
+				SerializedProperty prop = atlasAssets.GetArrayElementAtIndex(i);
 				if (prop.objectReferenceValue == null)
 				if (prop.objectReferenceValue == null)
 					return false;
 					return false;
 			}
 			}
@@ -793,7 +793,7 @@ namespace Spine.Unity.Editor {
 		public bool IsPlayingAnimation {
 		public bool IsPlayingAnimation {
 			get {
 			get {
 				if (!IsValid) return false;
 				if (!IsValid) return false;
-				var currentTrack = skeletonAnimation.AnimationState.GetCurrent(0);
+				TrackEntry currentTrack = skeletonAnimation.AnimationState.GetCurrent(0);
 				return currentTrack != null && currentTrack.TimeScale > 0;
 				return currentTrack != null && currentTrack.TimeScale > 0;
 			}
 			}
 		}
 		}
@@ -852,7 +852,7 @@ namespace Spine.Unity.Editor {
 				animationLastTime = CurrentTime;
 				animationLastTime = CurrentTime;
 
 
 				{
 				{
-					var c = this.PreviewUtilityCamera;
+					Camera c = this.PreviewUtilityCamera;
 					c.orthographic = true;
 					c.orthographic = true;
 					c.cullingMask = PreviewCameraCullingMask;
 					c.cullingMask = PreviewCameraCullingMask;
 					c.nearClipPlane = 0.01f;
 					c.nearClipPlane = 0.01f;
@@ -910,7 +910,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public Texture2D GetStaticPreview (int width, int height) {
 		public Texture2D GetStaticPreview (int width, int height) {
-			var c = this.PreviewUtilityCamera;
+			Camera c = this.PreviewUtilityCamera;
 			if (c == null)
 			if (c == null)
 				return null;
 				return null;
 
 
@@ -920,7 +920,7 @@ namespace Spine.Unity.Editor {
 			c.transform.position = cameraPositionGoal;
 			c.transform.position = cameraPositionGoal;
 			previewRenderUtility.BeginStaticPreview(new Rect(0, 0, width, height));
 			previewRenderUtility.BeginStaticPreview(new Rect(0, 0, width, height));
 			DoRenderPreview(false);
 			DoRenderPreview(false);
-			var tex = previewRenderUtility.EndStaticPreview();
+			Texture2D tex = previewRenderUtility.EndStaticPreview();
 
 
 			return tex;
 			return tex;
 		}
 		}
@@ -931,7 +931,7 @@ namespace Spine.Unity.Editor {
 
 
 			GameObject go = previewGameObject;
 			GameObject go = previewGameObject;
 			if (requiresRefresh && go != null) {
 			if (requiresRefresh && go != null) {
-				var renderer = go.GetComponent<Renderer>();
+				Renderer renderer = go.GetComponent<Renderer>();
 				renderer.enabled = true;
 				renderer.enabled = true;
 
 
 
 
@@ -943,7 +943,7 @@ namespace Spine.Unity.Editor {
 					skeletonAnimation.LateUpdate();
 					skeletonAnimation.LateUpdate();
 				}
 				}
 
 
-				var thisPreviewUtilityCamera = this.PreviewUtilityCamera;
+				Camera thisPreviewUtilityCamera = this.PreviewUtilityCamera;
 
 
 				if (drawHandles) {
 				if (drawHandles) {
 					Handles.SetCamera(thisPreviewUtilityCamera);
 					Handles.SetCamera(thisPreviewUtilityCamera);
@@ -979,7 +979,7 @@ namespace Spine.Unity.Editor {
 			lastCameraPositionGoal = cameraPositionGoal;
 			lastCameraPositionGoal = cameraPositionGoal;
 			lastCameraOrthoGoal = cameraOrthoGoal;
 			lastCameraOrthoGoal = cameraOrthoGoal;
 
 
-			var c = this.PreviewUtilityCamera;
+			Camera c = this.PreviewUtilityCamera;
 			float orthoSet = Mathf.Lerp(c.orthographicSize, cameraOrthoGoal, 0.1f);
 			float orthoSet = Mathf.Lerp(c.orthographicSize, cameraOrthoGoal, 0.1f);
 
 
 			c.orthographicSize = orthoSet;
 			c.orthographicSize = orthoSet;
@@ -1046,14 +1046,14 @@ namespace Spine.Unity.Editor {
 				return;
 				return;
 			}
 			}
 
 
-			var targetAnimation = skeletonData.FindAnimation(animationName);
+			Animation targetAnimation = skeletonData.FindAnimation(animationName);
 			if (targetAnimation != null) {
 			if (targetAnimation != null) {
-				var currentTrack = this.ActiveTrack;
+				TrackEntry currentTrack = this.ActiveTrack;
 				bool isEmpty = (currentTrack == null);
 				bool isEmpty = (currentTrack == null);
 				bool isNewAnimation = isEmpty || currentTrack.Animation != targetAnimation;
 				bool isNewAnimation = isEmpty || currentTrack.Animation != targetAnimation;
 
 
-				var skeleton = skeletonAnimation.Skeleton;
-				var animationState = skeletonAnimation.AnimationState;
+				Skeleton skeleton = skeletonAnimation.Skeleton;
+				AnimationState animationState = skeletonAnimation.AnimationState;
 
 
 				if (isEmpty) {
 				if (isEmpty) {
 					skeleton.SetToSetupPose();
 					skeleton.SetToSetupPose();
@@ -1072,7 +1072,7 @@ namespace Spine.Unity.Editor {
 					currentAnimationEvents.Clear();
 					currentAnimationEvents.Clear();
 					currentAnimationEventTimes.Clear();
 					currentAnimationEventTimes.Clear();
 					foreach (Timeline timeline in targetAnimation.Timelines) {
 					foreach (Timeline timeline in targetAnimation.Timelines) {
-						var eventTimeline = timeline as EventTimeline;
+						EventTimeline eventTimeline = timeline as EventTimeline;
 						if (eventTimeline != null) {
 						if (eventTimeline != null) {
 							for (int i = 0; i < eventTimeline.Events.Length; i++) {
 							for (int i = 0; i < eventTimeline.Events.Length; i++) {
 								currentAnimationEvents.Add(eventTimeline.Events[i]);
 								currentAnimationEvents.Add(eventTimeline.Events[i]);
@@ -1090,7 +1090,7 @@ namespace Spine.Unity.Editor {
 		void DrawSkinToolbar (Rect r) {
 		void DrawSkinToolbar (Rect r) {
 			if (!this.IsValid) return;
 			if (!this.IsValid) return;
 
 
-			var skeleton = this.Skeleton;
+			Skeleton skeleton = this.Skeleton;
 			string label = (skeleton.Skin != null) ? skeleton.Skin.Name : "default";
 			string label = (skeleton.Skin != null) ? skeleton.Skin.Name : "default";
 
 
 			Rect popRect = new Rect(r);
 			Rect popRect = new Rect(r);
@@ -1113,7 +1113,7 @@ namespace Spine.Unity.Editor {
 			if (!this.IsValid)
 			if (!this.IsValid)
 				return;
 				return;
 
 
-			var skeleton = this.Skeleton;
+			Skeleton skeleton = this.Skeleton;
 
 
 			Rect popRect = new Rect(r);
 			Rect popRect = new Rect(r);
 			popRect.y += 64;
 			popRect.y += 64;
@@ -1132,7 +1132,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		void DrawSkinDropdown () {
 		void DrawSkinDropdown () {
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 			foreach (Skin s in skeletonData.Skins)
 			foreach (Skin s in skeletonData.Skins)
 				menu.AddItem(new GUIContent(s.Name, Icons.skin), skeletonAnimation.skeleton.Skin == s, HandleSkinDropdownSelection, s);
 				menu.AddItem(new GUIContent(s.Name, Icons.skin), skeletonAnimation.skeleton.Skin == s, HandleSkinDropdownSelection, s);
 
 
@@ -1179,10 +1179,10 @@ namespace Spine.Unity.Editor {
 				currentAnimationEventTooltips.Clear();
 				currentAnimationEventTooltips.Clear();
 				for (int i = 0; i < currentAnimationEvents.Count; i++) {
 				for (int i = 0; i < currentAnimationEvents.Count; i++) {
 					float eventTime = currentAnimationEventTimes[i];
 					float eventTime = currentAnimationEventTimes[i];
-					var userEventIcon = Icons.userEvent;
+					Texture2D userEventIcon = Icons.userEvent;
 					float iconX = Mathf.Max(((eventTime / t.Animation.Duration) * lineRectWidth) - (userEventIcon.width / 2), barRect.x);
 					float iconX = Mathf.Max(((eventTime / t.Animation.Duration) * lineRectWidth) - (userEventIcon.width / 2), barRect.x);
 					float iconY = barRect.y + userEventIcon.height;
 					float iconY = barRect.y + userEventIcon.height;
-					var evRect = new Rect(barRect) {
+					Rect evRect = new Rect(barRect) {
 						x = iconX,
 						x = iconX,
 						y = iconY,
 						y = iconY,
 						width = userEventIcon.width,
 						width = userEventIcon.width,

+ 13 - 13
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SpineAtlasAssetInspector.cs

@@ -125,7 +125,7 @@ namespace Spine.Unity.Editor {
 
 
 			for (int i = 0; i < materials.arraySize; i++) {
 			for (int i = 0; i < materials.arraySize; i++) {
 				SerializedProperty prop = materials.GetArrayElementAtIndex(i);
 				SerializedProperty prop = materials.GetArrayElementAtIndex(i);
-				var material = (Material)prop.objectReferenceValue;
+				Material material = (Material)prop.objectReferenceValue;
 				if (material == null) {
 				if (material == null) {
 					EditorGUILayout.HelpBox("Materials cannot be null.", MessageType.Error);
 					EditorGUILayout.HelpBox("Materials cannot be null.", MessageType.Error);
 					return;
 					return;
@@ -134,10 +134,10 @@ namespace Spine.Unity.Editor {
 
 
 			EditorGUILayout.Space();
 			EditorGUILayout.Space();
 			if (SpineInspectorUtility.LargeCenteredButton(SpineInspectorUtility.TempContent("Set Mipmap Bias to " + SpinePreferences.DEFAULT_MIPMAPBIAS, tooltip: "This may help textures with mipmaps be less blurry when used for 2D sprites."))) {
 			if (SpineInspectorUtility.LargeCenteredButton(SpineInspectorUtility.TempContent("Set Mipmap Bias to " + SpinePreferences.DEFAULT_MIPMAPBIAS, tooltip: "This may help textures with mipmaps be less blurry when used for 2D sprites."))) {
-				foreach (var m in atlasAsset.materials) {
-					var texture = m.mainTexture;
+				foreach (Material m in atlasAsset.materials) {
+					Texture texture = m.mainTexture;
 					string texturePath = AssetDatabase.GetAssetPath(texture.GetInstanceID());
 					string texturePath = AssetDatabase.GetAssetPath(texture.GetInstanceID());
-					var importer = (TextureImporter)TextureImporter.GetAtPath(texturePath);
+					TextureImporter importer = (TextureImporter)TextureImporter.GetAtPath(texturePath);
 					importer.mipMapBias = SpinePreferences.DEFAULT_MIPMAPBIAS;
 					importer.mipMapBias = SpinePreferences.DEFAULT_MIPMAPBIAS;
 					EditorUtility.SetDirty(texture);
 					EditorUtility.SetDirty(texture);
 				}
 				}
@@ -147,8 +147,8 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.Space();
 			EditorGUILayout.Space();
 			if (atlasFile.objectReferenceValue != null) {
 			if (atlasFile.objectReferenceValue != null) {
 				if (SpineInspectorUtility.LargeCenteredButton(SpriteSlicesLabel)) {
 				if (SpineInspectorUtility.LargeCenteredButton(SpriteSlicesLabel)) {
-					var atlas = atlasAsset.GetAtlas();
-					foreach (var m in atlasAsset.materials)
+					Atlas atlas = atlasAsset.GetAtlas();
+					foreach (Material m in atlasAsset.materials)
 						UpdateSpriteSlices(m.mainTexture, atlas);
 						UpdateSpriteSlices(m.mainTexture, atlas);
 				}
 				}
 			}
 			}
@@ -267,7 +267,7 @@ namespace Spine.Unity.Editor {
 
 
 				int baseIndent = EditorGUI.indentLevel;
 				int baseIndent = EditorGUI.indentLevel;
 
 
-				var regions = SpineAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
+				List<AtlasRegion> regions = SpineAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
 				int regionsCount = regions.Count;
 				int regionsCount = regions.Count;
 				using (new EditorGUILayout.HorizontalScope()) {
 				using (new EditorGUILayout.HorizontalScope()) {
 					EditorGUILayout.LabelField("Atlas Regions", EditorStyles.boldLabel);
 					EditorGUILayout.LabelField("Atlas Regions", EditorStyles.boldLabel);
@@ -314,17 +314,17 @@ namespace Spine.Unity.Editor {
 
 
 		static public void UpdateSpriteSlices (Texture texture, Atlas atlas) {
 		static public void UpdateSpriteSlices (Texture texture, Atlas atlas) {
 			string texturePath = AssetDatabase.GetAssetPath(texture.GetInstanceID());
 			string texturePath = AssetDatabase.GetAssetPath(texture.GetInstanceID());
-			var t = (TextureImporter)TextureImporter.GetAtPath(texturePath);
+			TextureImporter t = (TextureImporter)TextureImporter.GetAtPath(texturePath);
 			t.spriteImportMode = SpriteImportMode.Multiple;
 			t.spriteImportMode = SpriteImportMode.Multiple;
-			var spriteSheet = t.spritesheet;
-			var sprites = new List<SpriteMetaData>(spriteSheet);
+			SpriteMetaData[] spriteSheet = t.spritesheet;
+			List<SpriteMetaData> sprites = new List<SpriteMetaData>(spriteSheet);
 
 
-			var regions = SpineAtlasAssetInspector.GetRegions(atlas);
+			List<AtlasRegion> regions = SpineAtlasAssetInspector.GetRegions(atlas);
 			char[] FilenameDelimiter = { '.' };
 			char[] FilenameDelimiter = { '.' };
 			int updatedCount = 0;
 			int updatedCount = 0;
 			int addedCount = 0;
 			int addedCount = 0;
 
 
-			foreach (var r in regions) {
+			foreach (AtlasRegion r in regions) {
 				string pageName = r.page.name.Split(FilenameDelimiter, StringSplitOptions.RemoveEmptyEntries)[0];
 				string pageName = r.page.name.Split(FilenameDelimiter, StringSplitOptions.RemoveEmptyEntries)[0];
 				string textureName = texture.name;
 				string textureName = texture.name;
 				bool pageMatch = string.Equals(pageName, textureName, StringComparison.Ordinal);
 				bool pageMatch = string.Equals(pageName, textureName, StringComparison.Ordinal);
@@ -356,7 +356,7 @@ namespace Spine.Unity.Editor {
 					spriteRect.y = r.page.height - spriteRect.height - r.y;
 					spriteRect.y = r.page.height - spriteRect.height - r.y;
 
 
 					if (spriteNameMatchExists) {
 					if (spriteNameMatchExists) {
-						var s = sprites[spriteIndex];
+						SpriteMetaData s = sprites[spriteIndex];
 						s.rect = spriteRect;
 						s.rect = spriteRect;
 						sprites[spriteIndex] = s;
 						sprites[spriteIndex] = s;
 						updatedCount++;
 						updatedCount++;

+ 2 - 2
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SpineSpriteAtlasAssetInspector.cs

@@ -96,7 +96,7 @@ namespace Spine.Unity.Editor {
 
 
 			for (int i = 0; i < materials.arraySize; i++) {
 			for (int i = 0; i < materials.arraySize; i++) {
 				SerializedProperty prop = materials.GetArrayElementAtIndex(i);
 				SerializedProperty prop = materials.GetArrayElementAtIndex(i);
-				var material = (Material)prop.objectReferenceValue;
+				Material material = (Material)prop.objectReferenceValue;
 				if (material == null) {
 				if (material == null) {
 					EditorGUILayout.HelpBox("Materials cannot be null.", MessageType.Error);
 					EditorGUILayout.HelpBox("Materials cannot be null.", MessageType.Error);
 					return;
 					return;
@@ -106,7 +106,7 @@ namespace Spine.Unity.Editor {
 			if (atlasFile.objectReferenceValue != null) {
 			if (atlasFile.objectReferenceValue != null) {
 				int baseIndent = EditorGUI.indentLevel;
 				int baseIndent = EditorGUI.indentLevel;
 
 
-				var regions = SpineSpriteAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
+				List<AtlasRegion> regions = SpineSpriteAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
 				int regionsCount = regions.Count;
 				int regionsCount = regions.Count;
 				using (new EditorGUILayout.HorizontalScope()) {
 				using (new EditorGUILayout.HorizontalScope()) {
 					EditorGUILayout.LabelField("Atlas Regions", EditorStyles.boldLabel);
 					EditorGUILayout.LabelField("Atlas Regions", EditorStyles.boldLabel);

+ 16 - 16
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerGraphicInspector.cs

@@ -46,13 +46,13 @@ namespace Spine.Unity.Editor {
 		#region Context Menu Item
 		#region Context Menu Item
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoneFollower GameObject")]
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoneFollower GameObject")]
 		static void AddBoneFollowerGameObject (MenuCommand cmd) {
 		static void AddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonGraphic = cmd.context as SkeletonGraphic;
-			var go = EditorInstantiation.NewGameObject("BoneFollower", true, typeof(RectTransform));
-			var t = go.transform;
+			SkeletonGraphic skeletonGraphic = cmd.context as SkeletonGraphic;
+			GameObject go = EditorInstantiation.NewGameObject("BoneFollower", true, typeof(RectTransform));
+			Transform t = go.transform;
 			t.SetParent(skeletonGraphic.transform);
 			t.SetParent(skeletonGraphic.transform);
 			t.localPosition = Vector3.zero;
 			t.localPosition = Vector3.zero;
 
 
-			var f = go.AddComponent<BoneFollowerGraphic>();
+			BoneFollowerGraphic f = go.AddComponent<BoneFollowerGraphic>();
 			f.skeletonGraphic = skeletonGraphic;
 			f.skeletonGraphic = skeletonGraphic;
 			f.SetBone(skeletonGraphic.Skeleton.RootBone.Data.Name);
 			f.SetBone(skeletonGraphic.Skeleton.RootBone.Data.Name);
 
 
@@ -64,7 +64,7 @@ namespace Spine.Unity.Editor {
 		// Validate
 		// Validate
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoneFollower GameObject", true)]
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoneFollower GameObject", true)]
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonGraphic = cmd.context as SkeletonGraphic;
+			SkeletonGraphic skeletonGraphic = cmd.context as SkeletonGraphic;
 			return skeletonGraphic.IsValid;
 			return skeletonGraphic.IsValid;
 		}
 		}
 		#endregion
 		#endregion
@@ -93,13 +93,13 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public void OnSceneGUI () {
 		public void OnSceneGUI () {
-			var tbf = target as BoneFollowerGraphic;
-			var skeletonGraphicComponent = tbf.SkeletonGraphic;
+			BoneFollowerGraphic tbf = target as BoneFollowerGraphic;
+			SkeletonGraphic skeletonGraphicComponent = tbf.SkeletonGraphic;
 			if (skeletonGraphicComponent == null) return;
 			if (skeletonGraphicComponent == null) return;
 
 
-			var transform = skeletonGraphicComponent.transform;
-			var skeleton = skeletonGraphicComponent.Skeleton;
-			var canvas = skeletonGraphicComponent.canvas;
+			Transform transform = skeletonGraphicComponent.transform;
+			Skeleton skeleton = skeletonGraphicComponent.Skeleton;
+			Canvas canvas = skeletonGraphicComponent.canvas;
 			float positionScale = canvas == null ? 1f : skeletonGraphicComponent.canvas.referencePixelsPerUnit;
 			float positionScale = canvas == null ? 1f : skeletonGraphicComponent.canvas.referencePixelsPerUnit;
 
 
 			if (string.IsNullOrEmpty(boneName.stringValue)) {
 			if (string.IsNullOrEmpty(boneName.stringValue)) {
@@ -107,7 +107,7 @@ namespace Spine.Unity.Editor {
 				SpineHandles.DrawBoneNames(transform, skeleton, positionScale);
 				SpineHandles.DrawBoneNames(transform, skeleton, positionScale);
 				Handles.Label(tbf.transform.position, "No bone selected", EditorStyles.helpBox);
 				Handles.Label(tbf.transform.position, "No bone selected", EditorStyles.helpBox);
 			} else {
 			} else {
-				var targetBone = tbf.bone;
+				Bone targetBone = tbf.bone;
 				if (targetBone == null) return;
 				if (targetBone == null) return;
 
 
 				SpineHandles.DrawBoneWireframe(transform, targetBone, SpineHandles.TransformContraintColor, positionScale);
 				SpineHandles.DrawBoneWireframe(transform, targetBone, SpineHandles.TransformContraintColor, positionScale);
@@ -119,8 +119,8 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.isEditingMultipleObjects) {
 			if (serializedObject.isEditingMultipleObjects) {
 				if (needsReset) {
 				if (needsReset) {
 					needsReset = false;
 					needsReset = false;
-					foreach (var o in targets) {
-						var bf = (BoneFollower)o;
+					foreach (Object o in targets) {
+						BoneFollower bf = (BoneFollower)o;
 						bf.Initialize();
 						bf.Initialize();
 						bf.LateUpdate();
 						bf.LateUpdate();
 					}
 					}
@@ -151,7 +151,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			EditorGUILayout.PropertyField(skeletonGraphic);
 			EditorGUILayout.PropertyField(skeletonGraphic);
-			var skeletonGraphicComponent = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
+			SkeletonGraphic skeletonGraphicComponent = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
 			if (skeletonGraphicComponent != null) {
 			if (skeletonGraphicComponent != null) {
 				if (skeletonGraphicComponent.gameObject == targetBoneFollower.gameObject) {
 				if (skeletonGraphicComponent.gameObject == targetBoneFollower.gameObject) {
 					skeletonGraphic.objectReferenceValue = null;
 					skeletonGraphic.objectReferenceValue = null;
@@ -182,7 +182,7 @@ namespace Spine.Unity.Editor {
 
 
 				//BoneFollowerInspector.RecommendRigidbodyButton(targetBoneFollower);
 				//BoneFollowerInspector.RecommendRigidbodyButton(targetBoneFollower);
 			} else {
 			} else {
-				var boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
+				SkeletonGraphic boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
 				if (boneFollowerSkeletonGraphic == null) {
 				if (boneFollowerSkeletonGraphic == null) {
 					EditorGUILayout.HelpBox("SkeletonGraphic is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
 					EditorGUILayout.HelpBox("SkeletonGraphic is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
 				} else {
 				} else {
@@ -196,7 +196,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 			}
 			}
 
 
-			var current = Event.current;
+			Event current = Event.current;
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			if (wasUndo)
 			if (wasUndo)
 				targetBoneFollower.Initialize();
 				targetBoneFollower.Initialize();

+ 17 - 17
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerInspector.cs

@@ -45,13 +45,13 @@ namespace Spine.Unity.Editor {
 		#region Context Menu Item
 		#region Context Menu Item
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoneFollower GameObject")]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoneFollower GameObject")]
 		static void AddBoneFollowerGameObject (MenuCommand cmd) {
 		static void AddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
-			var go = EditorInstantiation.NewGameObject("New BoneFollower", true);
-			var t = go.transform;
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
+			GameObject go = EditorInstantiation.NewGameObject("New BoneFollower", true);
+			Transform t = go.transform;
 			t.SetParent(skeletonRenderer.transform);
 			t.SetParent(skeletonRenderer.transform);
 			t.localPosition = Vector3.zero;
 			t.localPosition = Vector3.zero;
 
 
-			var f = go.AddComponent<BoneFollower>();
+			BoneFollower f = go.AddComponent<BoneFollower>();
 			f.skeletonRenderer = skeletonRenderer;
 			f.skeletonRenderer = skeletonRenderer;
 
 
 			EditorGUIUtility.PingObject(t);
 			EditorGUIUtility.PingObject(t);
@@ -62,7 +62,7 @@ namespace Spine.Unity.Editor {
 		// Validate
 		// Validate
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoneFollower GameObject", true)]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoneFollower GameObject", true)]
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
 			return skeletonRenderer.valid;
 			return skeletonRenderer.valid;
 		}
 		}
 
 
@@ -103,19 +103,19 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public void OnSceneGUI () {
 		public void OnSceneGUI () {
-			var tbf = target as BoneFollower;
-			var skeletonRendererComponent = tbf.skeletonRenderer;
+			BoneFollower tbf = target as BoneFollower;
+			SkeletonRenderer skeletonRendererComponent = tbf.skeletonRenderer;
 			if (skeletonRendererComponent == null) return;
 			if (skeletonRendererComponent == null) return;
 
 
-			var transform = skeletonRendererComponent.transform;
-			var skeleton = skeletonRendererComponent.skeleton;
+			Transform transform = skeletonRendererComponent.transform;
+			Skeleton skeleton = skeletonRendererComponent.skeleton;
 
 
 			if (string.IsNullOrEmpty(boneName.stringValue)) {
 			if (string.IsNullOrEmpty(boneName.stringValue)) {
 				SpineHandles.DrawBones(transform, skeleton);
 				SpineHandles.DrawBones(transform, skeleton);
 				SpineHandles.DrawBoneNames(transform, skeleton);
 				SpineHandles.DrawBoneNames(transform, skeleton);
 				Handles.Label(tbf.transform.position, "No bone selected", EditorStyles.helpBox);
 				Handles.Label(tbf.transform.position, "No bone selected", EditorStyles.helpBox);
 			} else {
 			} else {
-				var targetBone = tbf.bone;
+				Bone targetBone = tbf.bone;
 				if (targetBone == null) return;
 				if (targetBone == null) return;
 				SpineHandles.DrawBoneWireframe(transform, targetBone, SpineHandles.TransformContraintColor);
 				SpineHandles.DrawBoneWireframe(transform, targetBone, SpineHandles.TransformContraintColor);
 				Handles.Label(targetBone.GetWorldPosition(transform), targetBone.Data.Name, SpineHandles.BoneNameStyle);
 				Handles.Label(targetBone.GetWorldPosition(transform), targetBone.Data.Name, SpineHandles.BoneNameStyle);
@@ -126,8 +126,8 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.isEditingMultipleObjects) {
 			if (serializedObject.isEditingMultipleObjects) {
 				if (needsReset) {
 				if (needsReset) {
 					needsReset = false;
 					needsReset = false;
-					foreach (var o in targets) {
-						var bf = (BoneFollower)o;
+					foreach (UnityEngine.Object o in targets) {
+						BoneFollower bf = (BoneFollower)o;
 						bf.Initialize();
 						bf.Initialize();
 						bf.LateUpdate();
 						bf.LateUpdate();
 					}
 					}
@@ -158,7 +158,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			EditorGUILayout.PropertyField(skeletonRenderer);
 			EditorGUILayout.PropertyField(skeletonRenderer);
-			var skeletonRendererReference = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
+			SkeletonRenderer skeletonRendererReference = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
 			if (skeletonRendererReference != null) {
 			if (skeletonRendererReference != null) {
 				if (skeletonRendererReference.gameObject == targetBoneFollower.gameObject) {
 				if (skeletonRendererReference.gameObject == targetBoneFollower.gameObject) {
 					skeletonRenderer.objectReferenceValue = null;
 					skeletonRenderer.objectReferenceValue = null;
@@ -189,7 +189,7 @@ namespace Spine.Unity.Editor {
 
 
 				BoneFollowerInspector.RecommendRigidbodyButton(targetBoneFollower);
 				BoneFollowerInspector.RecommendRigidbodyButton(targetBoneFollower);
 			} else {
 			} else {
-				var boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
+				SkeletonRenderer boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
 				if (boneFollowerSkeletonRenderer == null) {
 				if (boneFollowerSkeletonRenderer == null) {
 					EditorGUILayout.HelpBox("SkeletonRenderer is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
 					EditorGUILayout.HelpBox("SkeletonRenderer is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
 				} else {
 				} else {
@@ -203,7 +203,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 			}
 			}
 
 
-			var current = Event.current;
+			Event current = Event.current;
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			if (wasUndo)
 			if (wasUndo)
 				targetBoneFollower.Initialize();
 				targetBoneFollower.Initialize();
@@ -218,9 +218,9 @@ namespace Spine.Unity.Editor {
 			if (missingRigidBody) {
 			if (missingRigidBody) {
 				using (new SpineInspectorUtility.BoxScope()) {
 				using (new SpineInspectorUtility.BoxScope()) {
 					EditorGUILayout.HelpBox("Collider detected. Unity recommends adding a Rigidbody to the Transforms of any colliders that are intended to be dynamically repositioned and rotated.", MessageType.Warning);
 					EditorGUILayout.HelpBox("Collider detected. Unity recommends adding a Rigidbody to the Transforms of any colliders that are intended to be dynamically repositioned and rotated.", MessageType.Warning);
-					var rbType = hasCollider2D ? typeof(Rigidbody2D) : typeof(Rigidbody);
+					System.Type rbType = hasCollider2D ? typeof(Rigidbody2D) : typeof(Rigidbody);
 					string rbLabel = string.Format("Add {0}", rbType.Name);
 					string rbLabel = string.Format("Add {0}", rbType.Name);
-					var rbContent = SpineInspectorUtility.TempContent(rbLabel, SpineInspectorUtility.UnityIcon(rbType), "Add a rigidbody to this GameObject to be the Physics body parent of the attached collider.");
+					GUIContent rbContent = SpineInspectorUtility.TempContent(rbLabel, SpineInspectorUtility.UnityIcon(rbType), "Add a rigidbody to this GameObject to be the Physics body parent of the attached collider.");
 					if (SpineInspectorUtility.CenteredButton(rbContent)) component.gameObject.AddComponent(rbType);
 					if (SpineInspectorUtility.CenteredButton(rbContent)) component.gameObject.AddComponent(rbType);
 				}
 				}
 			}
 			}

+ 18 - 18
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerGraphicInspector.cs

@@ -81,7 +81,7 @@ namespace Spine.Unity.Editor {
 
 
 			// Try to auto-assign SkeletonGraphic field.
 			// Try to auto-assign SkeletonGraphic field.
 			if (skeletonGraphic.objectReferenceValue == null) {
 			if (skeletonGraphic.objectReferenceValue == null) {
-				var foundSkeletonGraphic = follower.GetComponentInParent<SkeletonGraphic>();
+				SkeletonGraphic foundSkeletonGraphic = follower.GetComponentInParent<SkeletonGraphic>();
 				if (foundSkeletonGraphic != null)
 				if (foundSkeletonGraphic != null)
 					Debug.Log("BoundingBoxFollowerGraphic automatically assigned: " + foundSkeletonGraphic.gameObject.name);
 					Debug.Log("BoundingBoxFollowerGraphic automatically assigned: " + foundSkeletonGraphic.gameObject.name);
 				else if (Event.current.type == EventType.Repaint)
 				else if (Event.current.type == EventType.Repaint)
@@ -92,7 +92,7 @@ namespace Spine.Unity.Editor {
 				InitializeEditor();
 				InitializeEditor();
 			}
 			}
 
 
-			var skeletonGraphicValue = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
+			SkeletonGraphic skeletonGraphicValue = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
 			if (skeletonGraphicValue != null && skeletonGraphicValue.gameObject == follower.gameObject) {
 			if (skeletonGraphicValue != null && skeletonGraphicValue.gameObject == follower.gameObject) {
 				using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) {
 				using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) {
 					EditorGUILayout.HelpBox("It's ideal to add BoundingBoxFollowerGraphic to a separate child GameObject of the Spine GameObject.", MessageType.Warning);
 					EditorGUILayout.HelpBox("It's ideal to add BoundingBoxFollowerGraphic to a separate child GameObject of the Spine GameObject.", MessageType.Warning);
@@ -133,7 +133,7 @@ namespace Spine.Unity.Editor {
 					serializedObject.ApplyModifiedProperties();
 					serializedObject.ApplyModifiedProperties();
 					InitializeEditor();
 					InitializeEditor();
 					if (colliderParamChanged)
 					if (colliderParamChanged)
-						foreach (var col in follower.colliderTable.Values) {
+						foreach (PolygonCollider2D col in follower.colliderTable.Values) {
 							col.isTrigger = isTrigger.boolValue;
 							col.isTrigger = isTrigger.boolValue;
 							col.usedByEffector = usedByEffector.boolValue;
 							col.usedByEffector = usedByEffector.boolValue;
 							col.usedByComposite = usedByComposite.boolValue;
 							col.usedByComposite = usedByComposite.boolValue;
@@ -147,7 +147,7 @@ namespace Spine.Unity.Editor {
 				EditorGUILayout.HelpBox("BoundingBoxAttachments cannot be previewed in prefabs.", MessageType.Info);
 				EditorGUILayout.HelpBox("BoundingBoxAttachments cannot be previewed in prefabs.", MessageType.Info);
 
 
 				// How do you prevent components from being saved into the prefab? No such HideFlag. DontSaveInEditor | DontSaveInBuild does not work. DestroyImmediate does not work.
 				// How do you prevent components from being saved into the prefab? No such HideFlag. DontSaveInEditor | DontSaveInBuild does not work. DestroyImmediate does not work.
-				var collider = follower.GetComponent<PolygonCollider2D>();
+				PolygonCollider2D collider = follower.GetComponent<PolygonCollider2D>();
 				if (collider != null) Debug.LogWarning("Found BoundingBoxFollowerGraphic collider components in prefab. These are disposed and regenerated at runtime.");
 				if (collider != null) Debug.LogWarning("Found BoundingBoxFollowerGraphic collider components in prefab. These are disposed and regenerated at runtime.");
 
 
 			} else {
 			} else {
@@ -156,9 +156,9 @@ namespace Spine.Unity.Editor {
 						EditorGUI.indentLevel++;
 						EditorGUI.indentLevel++;
 						EditorGUILayout.LabelField(string.Format("Attachment Names ({0} PolygonCollider2D)", follower.colliderTable.Count));
 						EditorGUILayout.LabelField(string.Format("Attachment Names ({0} PolygonCollider2D)", follower.colliderTable.Count));
 						EditorGUI.BeginChangeCheck();
 						EditorGUI.BeginChangeCheck();
-						foreach (var kp in follower.nameTable) {
+						foreach (KeyValuePair<BoundingBoxAttachment, string> kp in follower.nameTable) {
 							string attachmentName = kp.Value;
 							string attachmentName = kp.Value;
-							var collider = follower.colliderTable[kp.Key];
+							PolygonCollider2D collider = follower.colliderTable[kp.Key];
 							bool isPlaceholder = attachmentName != kp.Key.Name;
 							bool isPlaceholder = attachmentName != kp.Key.Name;
 							collider.enabled = EditorGUILayout.ToggleLeft(new GUIContent(!isPlaceholder ? attachmentName : string.Format("{0} [{1}]", attachmentName, kp.Key.Name), isPlaceholder ? Icons.skinPlaceholder : Icons.boundingBox), collider.enabled);
 							collider.enabled = EditorGUILayout.ToggleLeft(new GUIContent(!isPlaceholder ? attachmentName : string.Format("{0} [{1}]", attachmentName, kp.Key.Name), isPlaceholder ? Icons.skinPlaceholder : Icons.boundingBox), collider.enabled);
 						}
 						}
@@ -183,7 +183,7 @@ namespace Spine.Unity.Editor {
 
 
 			if (Event.current.type == EventType.Repaint) {
 			if (Event.current.type == EventType.Repaint) {
 				if (addBoneFollower) {
 				if (addBoneFollower) {
-					var boneFollower = follower.gameObject.AddComponent<BoneFollowerGraphic>();
+					BoneFollowerGraphic boneFollower = follower.gameObject.AddComponent<BoneFollowerGraphic>();
 					boneFollower.skeletonGraphic = skeletonGraphicValue;
 					boneFollower.skeletonGraphic = skeletonGraphicValue;
 					boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
 					boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
 					addBoneFollower = false;
 					addBoneFollower = false;
@@ -204,14 +204,14 @@ namespace Spine.Unity.Editor {
 		#region Menus
 		#region Menus
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoundingBoxFollowerGraphic GameObject")]
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoundingBoxFollowerGraphic GameObject")]
 		static void AddBoundingBoxFollowerGraphicChild (MenuCommand command) {
 		static void AddBoundingBoxFollowerGraphicChild (MenuCommand command) {
-			var go = AddBoundingBoxFollowerGraphicChild((SkeletonGraphic)command.context);
+			GameObject go = AddBoundingBoxFollowerGraphicChild((SkeletonGraphic)command.context);
 			Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollowerGraphic");
 			Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollowerGraphic");
 		}
 		}
 
 
 		[MenuItem("CONTEXT/SkeletonGraphic/Add all BoundingBoxFollowerGraphic GameObjects")]
 		[MenuItem("CONTEXT/SkeletonGraphic/Add all BoundingBoxFollowerGraphic GameObjects")]
 		static void AddAllBoundingBoxFollowerGraphicChildren (MenuCommand command) {
 		static void AddAllBoundingBoxFollowerGraphicChildren (MenuCommand command) {
-			var objects = AddAllBoundingBoxFollowerGraphicChildren((SkeletonGraphic)command.context);
-			foreach (var go in objects)
+			List<GameObject> objects = AddAllBoundingBoxFollowerGraphicChildren((SkeletonGraphic)command.context);
+			foreach (GameObject go in objects)
 				Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollowerGraphic");
 				Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollowerGraphic");
 		}
 		}
 		#endregion
 		#endregion
@@ -220,10 +220,10 @@ namespace Spine.Unity.Editor {
 			BoundingBoxFollowerGraphic original = null, string name = "BoundingBoxFollowerGraphic",
 			BoundingBoxFollowerGraphic original = null, string name = "BoundingBoxFollowerGraphic",
 			string slotName = null) {
 			string slotName = null) {
 
 
-			var go = EditorInstantiation.NewGameObject(name, true);
+			GameObject go = EditorInstantiation.NewGameObject(name, true);
 			go.transform.SetParent(skeletonGraphic.transform, false);
 			go.transform.SetParent(skeletonGraphic.transform, false);
 			go.AddComponent<RectTransform>();
 			go.AddComponent<RectTransform>();
-			var newFollower = go.AddComponent<BoundingBoxFollowerGraphic>();
+			BoundingBoxFollowerGraphic newFollower = go.AddComponent<BoundingBoxFollowerGraphic>();
 
 
 			if (original != null) {
 			if (original != null) {
 				newFollower.slotName = original.slotName;
 				newFollower.slotName = original.slotName;
@@ -247,18 +247,18 @@ namespace Spine.Unity.Editor {
 			SkeletonGraphic skeletonGraphic, BoundingBoxFollowerGraphic original = null) {
 			SkeletonGraphic skeletonGraphic, BoundingBoxFollowerGraphic original = null) {
 
 
 			List<GameObject> createdGameObjects = new List<GameObject>();
 			List<GameObject> createdGameObjects = new List<GameObject>();
-			foreach (var skin in skeletonGraphic.Skeleton.Data.Skins) {
-				var attachments = skin.Attachments;
-				foreach (var entry in attachments) {
-					var boundingBoxAttachment = entry.Attachment as BoundingBoxAttachment;
+			foreach (Skin skin in skeletonGraphic.Skeleton.Data.Skins) {
+				ICollection<Skin.SkinEntry> attachments = skin.Attachments;
+				foreach (Skin.SkinEntry entry in attachments) {
+					BoundingBoxAttachment boundingBoxAttachment = entry.Attachment as BoundingBoxAttachment;
 					if (boundingBoxAttachment == null)
 					if (boundingBoxAttachment == null)
 						continue;
 						continue;
 					int slotIndex = entry.SlotIndex;
 					int slotIndex = entry.SlotIndex;
-					var slot = skeletonGraphic.Skeleton.Slots.Items[slotIndex];
+					Slot slot = skeletonGraphic.Skeleton.Slots.Items[slotIndex];
 					string slotName = slot.Data.Name;
 					string slotName = slot.Data.Name;
 					GameObject go = AddBoundingBoxFollowerGraphicChild(skeletonGraphic,
 					GameObject go = AddBoundingBoxFollowerGraphicChild(skeletonGraphic,
 						original, boundingBoxAttachment.Name, slotName);
 						original, boundingBoxAttachment.Name, slotName);
-					var boneFollower = go.AddComponent<BoneFollowerGraphic>();
+					BoneFollowerGraphic boneFollower = go.AddComponent<BoneFollowerGraphic>();
 					boneFollower.skeletonGraphic = skeletonGraphic;
 					boneFollower.skeletonGraphic = skeletonGraphic;
 					boneFollower.SetBone(slot.Data.BoneData.Name);
 					boneFollower.SetBone(slot.Data.BoneData.Name);
 					createdGameObjects.Add(go);
 					createdGameObjects.Add(go);

+ 21 - 21
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerInspector.cs

@@ -81,7 +81,7 @@ namespace Spine.Unity.Editor {
 
 
 			// Try to auto-assign SkeletonRenderer field.
 			// Try to auto-assign SkeletonRenderer field.
 			if (skeletonRenderer.objectReferenceValue == null) {
 			if (skeletonRenderer.objectReferenceValue == null) {
-				var foundSkeletonRenderer = follower.GetComponentInParent<SkeletonRenderer>();
+				SkeletonRenderer foundSkeletonRenderer = follower.GetComponentInParent<SkeletonRenderer>();
 				if (foundSkeletonRenderer != null)
 				if (foundSkeletonRenderer != null)
 					Debug.Log("BoundingBoxFollower automatically assigned: " + foundSkeletonRenderer.gameObject.name);
 					Debug.Log("BoundingBoxFollower automatically assigned: " + foundSkeletonRenderer.gameObject.name);
 				else if (Event.current.type == EventType.Repaint)
 				else if (Event.current.type == EventType.Repaint)
@@ -92,7 +92,7 @@ namespace Spine.Unity.Editor {
 				InitializeEditor();
 				InitializeEditor();
 			}
 			}
 
 
-			var skeletonRendererValue = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
+			SkeletonRenderer skeletonRendererValue = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
 			if (skeletonRendererValue != null && skeletonRendererValue.gameObject == follower.gameObject) {
 			if (skeletonRendererValue != null && skeletonRendererValue.gameObject == follower.gameObject) {
 				using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) {
 				using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) {
 					EditorGUILayout.HelpBox("It's ideal to add BoundingBoxFollower to a separate child GameObject of the Spine GameObject.", MessageType.Warning);
 					EditorGUILayout.HelpBox("It's ideal to add BoundingBoxFollower to a separate child GameObject of the Spine GameObject.", MessageType.Warning);
@@ -133,7 +133,7 @@ namespace Spine.Unity.Editor {
 					serializedObject.ApplyModifiedProperties();
 					serializedObject.ApplyModifiedProperties();
 					InitializeEditor();
 					InitializeEditor();
 					if (colliderParamChanged)
 					if (colliderParamChanged)
-						foreach (var col in follower.colliderTable.Values) {
+						foreach (PolygonCollider2D col in follower.colliderTable.Values) {
 							col.isTrigger = isTrigger.boolValue;
 							col.isTrigger = isTrigger.boolValue;
 							col.usedByEffector = usedByEffector.boolValue;
 							col.usedByEffector = usedByEffector.boolValue;
 							col.usedByComposite = usedByComposite.boolValue;
 							col.usedByComposite = usedByComposite.boolValue;
@@ -147,7 +147,7 @@ namespace Spine.Unity.Editor {
 				EditorGUILayout.HelpBox("BoundingBoxAttachments cannot be previewed in prefabs.", MessageType.Info);
 				EditorGUILayout.HelpBox("BoundingBoxAttachments cannot be previewed in prefabs.", MessageType.Info);
 
 
 				// How do you prevent components from being saved into the prefab? No such HideFlag. DontSaveInEditor | DontSaveInBuild does not work. DestroyImmediate does not work.
 				// How do you prevent components from being saved into the prefab? No such HideFlag. DontSaveInEditor | DontSaveInBuild does not work. DestroyImmediate does not work.
-				var collider = follower.GetComponent<PolygonCollider2D>();
+				PolygonCollider2D collider = follower.GetComponent<PolygonCollider2D>();
 				if (collider != null) Debug.LogWarning("Found BoundingBoxFollower collider components in prefab. These are disposed and regenerated at runtime.");
 				if (collider != null) Debug.LogWarning("Found BoundingBoxFollower collider components in prefab. These are disposed and regenerated at runtime.");
 
 
 			} else {
 			} else {
@@ -156,11 +156,11 @@ namespace Spine.Unity.Editor {
 						EditorGUI.indentLevel++;
 						EditorGUI.indentLevel++;
 						EditorGUILayout.LabelField(string.Format("Attachment Names ({0} PolygonCollider2D)", follower.colliderTable.Count));
 						EditorGUILayout.LabelField(string.Format("Attachment Names ({0} PolygonCollider2D)", follower.colliderTable.Count));
 						EditorGUI.BeginChangeCheck();
 						EditorGUI.BeginChangeCheck();
-						foreach (var kp in follower.nameTable) {
-							string attachmentName = kp.Value;
-							var collider = follower.colliderTable[kp.Key];
-							bool isPlaceholder = attachmentName != kp.Key.Name;
-							collider.enabled = EditorGUILayout.ToggleLeft(new GUIContent(!isPlaceholder ? attachmentName : string.Format("{0} [{1}]", attachmentName, kp.Key.Name), isPlaceholder ? Icons.skinPlaceholder : Icons.boundingBox), collider.enabled);
+						foreach (KeyValuePair<BoundingBoxAttachment, string> pair in follower.nameTable) {
+							string attachmentName = pair.Value;
+							PolygonCollider2D collider = follower.colliderTable[pair.Key];
+							bool isPlaceholder = attachmentName != pair.Key.Name;
+							collider.enabled = EditorGUILayout.ToggleLeft(new GUIContent(!isPlaceholder ? attachmentName : string.Format("{0} [{1}]", attachmentName, pair.Key.Name), isPlaceholder ? Icons.skinPlaceholder : Icons.boundingBox), collider.enabled);
 						}
 						}
 						sceneRepaintRequired |= EditorGUI.EndChangeCheck();
 						sceneRepaintRequired |= EditorGUI.EndChangeCheck();
 						EditorGUI.indentLevel--;
 						EditorGUI.indentLevel--;
@@ -183,7 +183,7 @@ namespace Spine.Unity.Editor {
 
 
 			if (Event.current.type == EventType.Repaint) {
 			if (Event.current.type == EventType.Repaint) {
 				if (addBoneFollower) {
 				if (addBoneFollower) {
-					var boneFollower = follower.gameObject.AddComponent<BoneFollower>();
+					BoneFollower boneFollower = follower.gameObject.AddComponent<BoneFollower>();
 					boneFollower.skeletonRenderer = skeletonRendererValue;
 					boneFollower.skeletonRenderer = skeletonRendererValue;
 					boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
 					boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
 					addBoneFollower = false;
 					addBoneFollower = false;
@@ -204,14 +204,14 @@ namespace Spine.Unity.Editor {
 		#region Menus
 		#region Menus
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoundingBoxFollower GameObject")]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoundingBoxFollower GameObject")]
 		static void AddBoundingBoxFollowerChild (MenuCommand command) {
 		static void AddBoundingBoxFollowerChild (MenuCommand command) {
-			var go = AddBoundingBoxFollowerChild((SkeletonRenderer)command.context);
+			GameObject go = AddBoundingBoxFollowerChild((SkeletonRenderer)command.context);
 			Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollower");
 			Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollower");
 		}
 		}
 
 
 		[MenuItem("CONTEXT/SkeletonRenderer/Add all BoundingBoxFollower GameObjects")]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add all BoundingBoxFollower GameObjects")]
 		static void AddAllBoundingBoxFollowerChildren (MenuCommand command) {
 		static void AddAllBoundingBoxFollowerChildren (MenuCommand command) {
-			var objects = AddAllBoundingBoxFollowerChildren((SkeletonRenderer)command.context);
-			foreach (var go in objects)
+			List<GameObject> objects = AddAllBoundingBoxFollowerChildren((SkeletonRenderer)command.context);
+			foreach (GameObject go in objects)
 				Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollower");
 				Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollower");
 		}
 		}
 		#endregion
 		#endregion
@@ -220,9 +220,9 @@ namespace Spine.Unity.Editor {
 			BoundingBoxFollower original = null, string name = "BoundingBoxFollower",
 			BoundingBoxFollower original = null, string name = "BoundingBoxFollower",
 			string slotName = null) {
 			string slotName = null) {
 
 
-			var go = EditorInstantiation.NewGameObject(name, true);
+			GameObject go = EditorInstantiation.NewGameObject(name, true);
 			go.transform.SetParent(skeletonRenderer.transform, false);
 			go.transform.SetParent(skeletonRenderer.transform, false);
-			var newFollower = go.AddComponent<BoundingBoxFollower>();
+			BoundingBoxFollower newFollower = go.AddComponent<BoundingBoxFollower>();
 
 
 			if (original != null) {
 			if (original != null) {
 				newFollower.slotName = original.slotName;
 				newFollower.slotName = original.slotName;
@@ -246,18 +246,18 @@ namespace Spine.Unity.Editor {
 			SkeletonRenderer skeletonRenderer, BoundingBoxFollower original = null) {
 			SkeletonRenderer skeletonRenderer, BoundingBoxFollower original = null) {
 
 
 			List<GameObject> createdGameObjects = new List<GameObject>();
 			List<GameObject> createdGameObjects = new List<GameObject>();
-			foreach (var skin in skeletonRenderer.Skeleton.Data.Skins) {
-				var attachments = skin.Attachments;
-				foreach (var entry in attachments) {
-					var boundingBoxAttachment = entry.Attachment as BoundingBoxAttachment;
+			foreach (Skin skin in skeletonRenderer.Skeleton.Data.Skins) {
+				ICollection<Skin.SkinEntry> attachments = skin.Attachments;
+				foreach (Skin.SkinEntry entry in attachments) {
+					BoundingBoxAttachment boundingBoxAttachment = entry.Attachment as BoundingBoxAttachment;
 					if (boundingBoxAttachment == null)
 					if (boundingBoxAttachment == null)
 						continue;
 						continue;
 					int slotIndex = entry.SlotIndex;
 					int slotIndex = entry.SlotIndex;
-					var slot = skeletonRenderer.Skeleton.Slots.Items[slotIndex];
+					Slot slot = skeletonRenderer.Skeleton.Slots.Items[slotIndex];
 					string slotName = slot.Data.Name;
 					string slotName = slot.Data.Name;
 					GameObject go = AddBoundingBoxFollowerChild(skeletonRenderer,
 					GameObject go = AddBoundingBoxFollowerChild(skeletonRenderer,
 						original, boundingBoxAttachment.Name, slotName);
 						original, boundingBoxAttachment.Name, slotName);
-					var boneFollower = go.AddComponent<BoneFollower>();
+					BoneFollower boneFollower = go.AddComponent<BoneFollower>();
 					boneFollower.skeletonRenderer = skeletonRenderer;
 					boneFollower.skeletonRenderer = skeletonRenderer;
 					boneFollower.SetBone(slot.Data.BoneData.Name);
 					boneFollower.SetBone(slot.Data.BoneData.Name);
 					createdGameObjects.Add(go);
 					createdGameObjects.Add(go);

+ 18 - 18
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/PointFollowerInspector.cs

@@ -45,13 +45,13 @@ namespace Spine.Unity.Editor {
 		#region Context Menu Item
 		#region Context Menu Item
 		[MenuItem("CONTEXT/SkeletonRenderer/Add PointFollower GameObject")]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add PointFollower GameObject")]
 		static void AddBoneFollowerGameObject (MenuCommand cmd) {
 		static void AddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
-			var go = EditorInstantiation.NewGameObject("PointFollower", true);
-			var t = go.transform;
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
+			GameObject go = EditorInstantiation.NewGameObject("PointFollower", true);
+			Transform t = go.transform;
 			t.SetParent(skeletonRenderer.transform);
 			t.SetParent(skeletonRenderer.transform);
 			t.localPosition = Vector3.zero;
 			t.localPosition = Vector3.zero;
 
 
-			var f = go.AddComponent<PointFollower>();
+			PointFollower f = go.AddComponent<PointFollower>();
 			f.skeletonRenderer = skeletonRenderer;
 			f.skeletonRenderer = skeletonRenderer;
 
 
 			EditorGUIUtility.PingObject(t);
 			EditorGUIUtility.PingObject(t);
@@ -62,7 +62,7 @@ namespace Spine.Unity.Editor {
 		// Validate
 		// Validate
 		[MenuItem("CONTEXT/SkeletonRenderer/Add PointFollower GameObject", true)]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add PointFollower GameObject", true)]
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
 			return skeletonRenderer.valid;
 			return skeletonRenderer.valid;
 		}
 		}
 		#endregion
 		#endregion
@@ -85,24 +85,24 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public void OnSceneGUI () {
 		public void OnSceneGUI () {
-			var tbf = target as PointFollower;
-			var skeletonRendererComponent = tbf.skeletonRenderer;
+			PointFollower tbf = target as PointFollower;
+			SkeletonRenderer skeletonRendererComponent = tbf.skeletonRenderer;
 			if (skeletonRendererComponent == null)
 			if (skeletonRendererComponent == null)
 				return;
 				return;
 
 
-			var skeleton = skeletonRendererComponent.skeleton;
-			var skeletonTransform = skeletonRendererComponent.transform;
+			Skeleton skeleton = skeletonRendererComponent.skeleton;
+			Transform skeletonTransform = skeletonRendererComponent.transform;
 
 
 			if (string.IsNullOrEmpty(pointAttachmentName.stringValue)) {
 			if (string.IsNullOrEmpty(pointAttachmentName.stringValue)) {
 				// Draw all active PointAttachments in the current skin
 				// Draw all active PointAttachments in the current skin
-				var currentSkin = skeleton.Skin;
+				Skin currentSkin = skeleton.Skin;
 				if (currentSkin != skeleton.Data.DefaultSkin) DrawPointsInSkin(skeleton.Data.DefaultSkin, skeleton, skeletonTransform);
 				if (currentSkin != skeleton.Data.DefaultSkin) DrawPointsInSkin(skeleton.Data.DefaultSkin, skeleton, skeletonTransform);
 				if (currentSkin != null) DrawPointsInSkin(currentSkin, skeleton, skeletonTransform);
 				if (currentSkin != null) DrawPointsInSkin(currentSkin, skeleton, skeletonTransform);
 			} else {
 			} else {
 				Slot slot = skeleton.FindSlot(slotName.stringValue);
 				Slot slot = skeleton.FindSlot(slotName.stringValue);
 				if (slot != null) {
 				if (slot != null) {
 					int slotIndex = slot.Data.Index;
 					int slotIndex = slot.Data.Index;
-					var point = skeleton.GetAttachment(slotIndex, pointAttachmentName.stringValue) as PointAttachment;
+					PointAttachment point = skeleton.GetAttachment(slotIndex, pointAttachmentName.stringValue) as PointAttachment;
 					if (point != null) {
 					if (point != null) {
 						DrawPointAttachmentWithLabel(point, slot.Bone, skeletonTransform);
 						DrawPointAttachmentWithLabel(point, slot.Bone, skeletonTransform);
 					}
 					}
@@ -111,10 +111,10 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void DrawPointsInSkin (Skin skin, Skeleton skeleton, Transform transform) {
 		static void DrawPointsInSkin (Skin skin, Skeleton skeleton, Transform transform) {
-			foreach (var skinEntry in skin.Attachments) {
-				var attachment = skinEntry.Attachment as PointAttachment;
+			foreach (Skin.SkinEntry skinEntry in skin.Attachments) {
+				PointAttachment attachment = skinEntry.Attachment as PointAttachment;
 				if (attachment != null) {
 				if (attachment != null) {
-					var slot = skeleton.Slots.Items[skinEntry.SlotIndex];
+					Slot slot = skeleton.Slots.Items[skinEntry.SlotIndex];
 					DrawPointAttachmentWithLabel(attachment, slot.Bone, transform);
 					DrawPointAttachmentWithLabel(attachment, slot.Bone, transform);
 				}
 				}
 			}
 			}
@@ -130,8 +130,8 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.isEditingMultipleObjects) {
 			if (serializedObject.isEditingMultipleObjects) {
 				if (needsReset) {
 				if (needsReset) {
 					needsReset = false;
 					needsReset = false;
-					foreach (var o in targets) {
-						var bf = (BoneFollower)o;
+					foreach (Object o in targets) {
+						BoneFollower bf = (BoneFollower)o;
 						bf.Initialize();
 						bf.Initialize();
 						bf.LateUpdate();
 						bf.LateUpdate();
 					}
 					}
@@ -163,7 +163,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 			}
 			}
 
 
-			var skeletonRendererReference = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
+			SkeletonRenderer skeletonRendererReference = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
 			if (skeletonRendererReference != null) {
 			if (skeletonRendererReference != null) {
 				if (skeletonRendererReference.gameObject == targetPointFollower.gameObject) {
 				if (skeletonRendererReference.gameObject == targetPointFollower.gameObject) {
 					skeletonRenderer.objectReferenceValue = null;
 					skeletonRenderer.objectReferenceValue = null;
@@ -175,7 +175,7 @@ namespace Spine.Unity.Editor {
 				needsReset = true;
 				needsReset = true;
 			}
 			}
 
 
-			var current = Event.current;
+			Event current = Event.current;
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			if (wasUndo)
 			if (wasUndo)
 				targetPointFollower.Initialize();
 				targetPointFollower.Initialize();

+ 5 - 5
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs

@@ -58,7 +58,7 @@ namespace Spine.Unity.Editor {
 			if (!TargetIsValid) return;
 			if (!TargetIsValid) return;
 			bool sameData = SpineInspectorUtility.TargetsUseSameData(serializedObject);
 			bool sameData = SpineInspectorUtility.TargetsUseSameData(serializedObject);
 
 
-			foreach (var o in targets)
+			foreach (UnityEngine.Object o in targets)
 				TrySetAnimation(o as SkeletonAnimation);
 				TrySetAnimation(o as SkeletonAnimation);
 
 
 			EditorGUILayout.Space();
 			EditorGUILayout.Space();
@@ -74,8 +74,8 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.PropertyField(loop, LoopLabel);
 			EditorGUILayout.PropertyField(loop, LoopLabel);
 			wasAnimationParameterChanged |= EditorGUI.EndChangeCheck(); // Value used in the next update.
 			wasAnimationParameterChanged |= EditorGUI.EndChangeCheck(); // Value used in the next update.
 			EditorGUILayout.PropertyField(timeScale, TimeScaleLabel);
 			EditorGUILayout.PropertyField(timeScale, TimeScaleLabel);
-			foreach (var o in targets) {
-				var component = o as SkeletonAnimation;
+			foreach (UnityEngine.Object o in targets) {
+				SkeletonAnimation component = o as SkeletonAnimation;
 				component.timeScale = Mathf.Max(component.timeScale, 0);
 				component.timeScale = Mathf.Max(component.timeScale, 0);
 			}
 			}
 			EditorGUILayout.PropertyField(unscaledTime, UnscaledTimeLabel);
 			EditorGUILayout.PropertyField(unscaledTime, UnscaledTimeLabel);
@@ -99,8 +99,8 @@ namespace Spine.Unity.Editor {
 					((activeAnimation != animationName.stringValue) || (activeLoop != loop.boolValue));
 					((activeAnimation != animationName.stringValue) || (activeLoop != loop.boolValue));
 				if (animationParameterChanged) {
 				if (animationParameterChanged) {
 					this.wasAnimationParameterChanged = false;
 					this.wasAnimationParameterChanged = false;
-					var skeleton = skeletonAnimation.Skeleton;
-					var state = skeletonAnimation.AnimationState;
+					Skeleton skeleton = skeletonAnimation.Skeleton;
+					AnimationState state = skeletonAnimation.AnimationState;
 
 
 					if (!Application.isPlaying) {
 					if (!Application.isPlaying) {
 						if (state != null) state.ClearTrack(0);
 						if (state != null) state.ClearTrack(0);

+ 4 - 4
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicCustomMaterialsInspector.cs

@@ -50,14 +50,14 @@ namespace Spine.Unity.Editor {
 		#region SkeletonGraphic context menu
 		#region SkeletonGraphic context menu
 		[MenuItem("CONTEXT/SkeletonGraphic/Add Basic Serialized Custom Materials")]
 		[MenuItem("CONTEXT/SkeletonGraphic/Add Basic Serialized Custom Materials")]
 		static void AddSkeletonGraphicCustomMaterials (MenuCommand menuCommand) {
 		static void AddSkeletonGraphicCustomMaterials (MenuCommand menuCommand) {
-			var skeletonGraphic = (SkeletonGraphic)menuCommand.context;
-			var newComponent = skeletonGraphic.gameObject.AddComponent<SkeletonGraphicCustomMaterials>();
+			SkeletonGraphic skeletonGraphic = (SkeletonGraphic)menuCommand.context;
+			SkeletonGraphicCustomMaterials newComponent = skeletonGraphic.gameObject.AddComponent<SkeletonGraphicCustomMaterials>();
 			Undo.RegisterCreatedObjectUndo(newComponent, "Add Basic Serialized Custom Materials");
 			Undo.RegisterCreatedObjectUndo(newComponent, "Add Basic Serialized Custom Materials");
 		}
 		}
 
 
 		[MenuItem("CONTEXT/SkeletonGraphic/Add Basic Serialized Custom Materials", true)]
 		[MenuItem("CONTEXT/SkeletonGraphic/Add Basic Serialized Custom Materials", true)]
 		static bool AddSkeletonGraphicCustomMaterials_Validate (MenuCommand menuCommand) {
 		static bool AddSkeletonGraphicCustomMaterials_Validate (MenuCommand menuCommand) {
-			var skeletonGraphic = (SkeletonGraphic)menuCommand.context;
+			SkeletonGraphic skeletonGraphic = (SkeletonGraphic)menuCommand.context;
 			return (skeletonGraphic.GetComponent<SkeletonGraphicCustomMaterials>() == null);
 			return (skeletonGraphic.GetComponent<SkeletonGraphicCustomMaterials>() == null);
 		}
 		}
 		#endregion
 		#endregion
@@ -72,7 +72,7 @@ namespace Spine.Unity.Editor {
 
 
 		public override void OnInspectorGUI () {
 		public override void OnInspectorGUI () {
 			component = (SkeletonGraphicCustomMaterials)target;
 			component = (SkeletonGraphicCustomMaterials)target;
-			var skeletonGraphic = component.skeletonGraphic;
+			SkeletonGraphic skeletonGraphic = component.skeletonGraphic;
 
 
 			// Draw the default inspector
 			// Draw the default inspector
 			DrawDefaultInspector();
 			DrawDefaultInspector();

+ 36 - 35
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicInspector.cs

@@ -35,6 +35,7 @@
 #define HAS_CULL_TRANSPARENT_MESH
 #define HAS_CULL_TRANSPARENT_MESH
 #endif
 #endif
 
 
+using System.Reflection;
 using UnityEditor;
 using UnityEditor;
 using UnityEngine;
 using UnityEngine;
 
 
@@ -75,14 +76,14 @@ namespace Spine.Unity.Editor {
 		protected bool TargetIsValid {
 		protected bool TargetIsValid {
 			get {
 			get {
 				if (serializedObject.isEditingMultipleObjects) {
 				if (serializedObject.isEditingMultipleObjects) {
-					foreach (var o in targets) {
-						var component = (SkeletonGraphic)o;
+					foreach (UnityEngine.Object o in targets) {
+						SkeletonGraphic component = (SkeletonGraphic)o;
 						if (!component.IsValid)
 						if (!component.IsValid)
 							return false;
 							return false;
 					}
 					}
 					return true;
 					return true;
 				} else {
 				} else {
-					var component = (SkeletonGraphic)target;
+					SkeletonGraphic component = (SkeletonGraphic)target;
 					return component.IsValid;
 					return component.IsValid;
 				}
 				}
 			}
 			}
@@ -100,7 +101,7 @@ namespace Spine.Unity.Editor {
 			SkeletonDataAssetLabel = new GUIContent("SkeletonData Asset", Icons.spine);
 			SkeletonDataAssetLabel = new GUIContent("SkeletonData Asset", Icons.spine);
 			UpdateTimingLabel = new GUIContent("Animation Update", "Whether to update the animation in normal Update (the default), physics step FixedUpdate, or manually via a user call.");
 			UpdateTimingLabel = new GUIContent("Animation Update", "Whether to update the animation in normal Update (the default), physics step FixedUpdate, or manually via a user call.");
 
 
-			var so = this.serializedObject;
+			SerializedObject so = this.serializedObject;
 			thisSkeletonGraphic = target as SkeletonGraphic;
 			thisSkeletonGraphic = target as SkeletonGraphic;
 
 
 			// MaskableGraphic
 			// MaskableGraphic
@@ -145,12 +146,12 @@ namespace Spine.Unity.Editor {
 			if (UnityEngine.Event.current.type == EventType.Layout) {
 			if (UnityEngine.Event.current.type == EventType.Layout) {
 				if (forceReloadQueued) {
 				if (forceReloadQueued) {
 					forceReloadQueued = false;
 					forceReloadQueued = false;
-					foreach (var c in targets) {
+					foreach (UnityEngine.Object c in targets) {
 						SpineEditorUtilities.ReloadSkeletonDataAssetAndComponent(c as SkeletonGraphic);
 						SpineEditorUtilities.ReloadSkeletonDataAssetAndComponent(c as SkeletonGraphic);
 					}
 					}
 				} else {
 				} else {
-					foreach (var c in targets) {
-						var component = c as SkeletonGraphic;
+					foreach (UnityEngine.Object c in targets) {
+						SkeletonGraphic component = c as SkeletonGraphic;
 						if (!component.IsValid) {
 						if (!component.IsValid) {
 							SpineEditorUtilities.ReinitializeComponent(component);
 							SpineEditorUtilities.ReinitializeComponent(component);
 							if (!component.IsValid) continue;
 							if (!component.IsValid) continue;
@@ -211,13 +212,13 @@ namespace Spine.Unity.Editor {
 						if (GUILayout.Button(new GUIContent("Trim Renderers", "Remove currently unused CanvasRenderer GameObjects. These will be regenerated whenever needed."),
 						if (GUILayout.Button(new GUIContent("Trim Renderers", "Remove currently unused CanvasRenderer GameObjects. These will be regenerated whenever needed."),
 							EditorStyles.miniButton, GUILayout.Width(100f))) {
 							EditorStyles.miniButton, GUILayout.Width(100f))) {
 
 
-							foreach (var skeletonGraphic in targets) {
+							foreach (UnityEngine.Object skeletonGraphic in targets) {
 								((SkeletonGraphic)skeletonGraphic).TrimRenderers();
 								((SkeletonGraphic)skeletonGraphic).TrimRenderers();
 							}
 							}
 						}
 						}
 						EditorGUILayout.EndHorizontal();
 						EditorGUILayout.EndHorizontal();
 
 
-						var blendModeMaterials = thisSkeletonGraphic.skeletonDataAsset.blendModeMaterials;
+						BlendModeMaterials blendModeMaterials = thisSkeletonGraphic.skeletonDataAsset.blendModeMaterials;
 						if (allowMultipleCanvasRenderers.boolValue == true && blendModeMaterials.RequiresBlendModeMaterials) {
 						if (allowMultipleCanvasRenderers.boolValue == true && blendModeMaterials.RequiresBlendModeMaterials) {
 							using (new SpineInspectorUtility.IndentScope()) {
 							using (new SpineInspectorUtility.IndentScope()) {
 								EditorGUILayout.BeginHorizontal();
 								EditorGUILayout.BeginHorizontal();
@@ -274,7 +275,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.Space();
 			EditorGUILayout.Space();
 			EditorGUILayout.PropertyField(initialSkinName);
 			EditorGUILayout.PropertyField(initialSkinName);
 			{
 			{
-				var rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
+				Rect rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
 				EditorGUI.PrefixLabel(rect, SpineInspectorUtility.TempContent("Initial Flip"));
 				EditorGUI.PrefixLabel(rect, SpineInspectorUtility.TempContent("Initial Flip"));
 				rect.x += EditorGUIUtility.labelWidth;
 				rect.x += EditorGUIUtility.labelWidth;
 				rect.width = 30f;
 				rect.width = 30f;
@@ -301,7 +302,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.BeginHorizontal(GUILayout.Height(EditorGUIUtility.singleLineHeight + 5));
 			EditorGUILayout.BeginHorizontal(GUILayout.Height(EditorGUIUtility.singleLineHeight + 5));
 			EditorGUILayout.PrefixLabel("Match RectTransform with Mesh");
 			EditorGUILayout.PrefixLabel("Match RectTransform with Mesh");
 			if (GUILayout.Button("Match", EditorStyles.miniButton, GUILayout.Width(65f))) {
 			if (GUILayout.Button("Match", EditorStyles.miniButton, GUILayout.Width(65f))) {
-				foreach (var skeletonGraphic in targets) {
+				foreach (UnityEngine.Object skeletonGraphic in targets) {
 					MatchRectTransformWithBounds((SkeletonGraphic)skeletonGraphic);
 					MatchRectTransformWithBounds((SkeletonGraphic)skeletonGraphic);
 				}
 				}
 			}
 			}
@@ -310,8 +311,8 @@ namespace Spine.Unity.Editor {
 			if (TargetIsValid && !isInspectingPrefab) {
 			if (TargetIsValid && !isInspectingPrefab) {
 				EditorGUILayout.Space();
 				EditorGUILayout.Space();
 				if (SpineInspectorUtility.CenteredButton(new GUIContent("Add Skeleton Utility", Icons.skeletonUtility), 21, true, 200f))
 				if (SpineInspectorUtility.CenteredButton(new GUIContent("Add Skeleton Utility", Icons.skeletonUtility), 21, true, 200f))
-					foreach (var t in targets) {
-						var component = t as Component;
+					foreach (UnityEngine.Object t in targets) {
+						Component component = t as Component;
 						if (component.GetComponent<SkeletonUtility>() == null) {
 						if (component.GetComponent<SkeletonUtility>() == null) {
 							component.gameObject.AddComponent<SkeletonUtility>();
 							component.gameObject.AddComponent<SkeletonUtility>();
 						}
 						}
@@ -326,8 +327,8 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			if (slotsReapplyRequired && UnityEngine.Event.current.type == EventType.Repaint) {
 			if (slotsReapplyRequired && UnityEngine.Event.current.type == EventType.Repaint) {
-				foreach (var target in targets) {
-					var skeletonGraphic = (SkeletonGraphic)target;
+				foreach (UnityEngine.Object target in targets) {
+					SkeletonGraphic skeletonGraphic = (SkeletonGraphic)target;
 					skeletonGraphic.ReapplySeparatorSlotNames();
 					skeletonGraphic.ReapplySeparatorSlotNames();
 					skeletonGraphic.LateUpdate();
 					skeletonGraphic.LateUpdate();
 					SceneView.RepaintAll();
 					SceneView.RepaintAll();
@@ -337,8 +338,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected bool SkeletonHasMultipleSubmeshes () {
 		protected bool SkeletonHasMultipleSubmeshes () {
-			foreach (var target in targets) {
-				var skeletonGraphic = (SkeletonGraphic)target;
+			foreach (UnityEngine.Object target in targets) {
+				SkeletonGraphic skeletonGraphic = (SkeletonGraphic)target;
 				if (skeletonGraphic.HasMultipleSubmeshInstructions())
 				if (skeletonGraphic.HasMultipleSubmeshInstructions())
 					return true;
 					return true;
 			}
 			}
@@ -346,8 +347,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected void AssignDefaultBlendModeMaterials () {
 		protected void AssignDefaultBlendModeMaterials () {
-			foreach (var target in targets) {
-				var skeletonGraphic = (SkeletonGraphic)target;
+			foreach (UnityEngine.Object target in targets) {
+				SkeletonGraphic skeletonGraphic = (SkeletonGraphic)target;
 				skeletonGraphic.additiveMaterial = DefaultSkeletonGraphicAdditiveMaterial;
 				skeletonGraphic.additiveMaterial = DefaultSkeletonGraphicAdditiveMaterial;
 				skeletonGraphic.multiplyMaterial = DefaultSkeletonGraphicMultiplyMaterial;
 				skeletonGraphic.multiplyMaterial = DefaultSkeletonGraphicMultiplyMaterial;
 				skeletonGraphic.screenMaterial = DefaultSkeletonGraphicScreenMaterial;
 				skeletonGraphic.screenMaterial = DefaultSkeletonGraphicScreenMaterial;
@@ -355,12 +356,12 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public static void SetSeparatorSlotNames (SkeletonRenderer skeletonRenderer, string[] newSlotNames) {
 		public static void SetSeparatorSlotNames (SkeletonRenderer skeletonRenderer, string[] newSlotNames) {
-			var field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
+			FieldInfo field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
 			field.SetValue(skeletonRenderer, newSlotNames);
 			field.SetValue(skeletonRenderer, newSlotNames);
 		}
 		}
 
 
 		public static string[] GetSeparatorSlotNames (SkeletonRenderer skeletonRenderer) {
 		public static string[] GetSeparatorSlotNames (SkeletonRenderer skeletonRenderer) {
-			var field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
+			FieldInfo field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
 			return field.GetValue(skeletonRenderer) as string[];
 			return field.GetValue(skeletonRenderer) as string[];
 		}
 		}
 
 
@@ -370,8 +371,8 @@ namespace Spine.Unity.Editor {
 			bool multi = separatorSlotNames.serializedObject.isEditingMultipleObjects;
 			bool multi = separatorSlotNames.serializedObject.isEditingMultipleObjects;
 			bool hasTerminalSlot = false;
 			bool hasTerminalSlot = false;
 			if (!multi) {
 			if (!multi) {
-				var sr = separatorSlotNames.serializedObject.targetObject as ISkeletonComponent;
-				var skeleton = sr.Skeleton;
+				ISkeletonComponent sr = separatorSlotNames.serializedObject.targetObject as ISkeletonComponent;
+				Skeleton skeleton = sr.Skeleton;
 				int lastSlot = skeleton.Slots.Count - 1;
 				int lastSlot = skeleton.Slots.Count - 1;
 				if (skeleton != null) {
 				if (skeleton != null) {
 					for (int i = 0, n = separatorSlotNames.arraySize; i < n; i++) {
 					for (int i = 0, n = separatorSlotNames.arraySize; i < n; i++) {
@@ -409,7 +410,7 @@ namespace Spine.Unity.Editor {
 		#region Menus
 		#region Menus
 		[MenuItem("CONTEXT/SkeletonGraphic/Match RectTransform with Mesh Bounds")]
 		[MenuItem("CONTEXT/SkeletonGraphic/Match RectTransform with Mesh Bounds")]
 		static void MatchRectTransformWithBounds (MenuCommand command) {
 		static void MatchRectTransformWithBounds (MenuCommand command) {
-			var skeletonGraphic = (SkeletonGraphic)command.context;
+			SkeletonGraphic skeletonGraphic = (SkeletonGraphic)command.context;
 			MatchRectTransformWithBounds(skeletonGraphic);
 			MatchRectTransformWithBounds(skeletonGraphic);
 		}
 		}
 
 
@@ -420,13 +421,13 @@ namespace Spine.Unity.Editor {
 
 
 		[MenuItem("GameObject/Spine/SkeletonGraphic (UnityUI)", false, 15)]
 		[MenuItem("GameObject/Spine/SkeletonGraphic (UnityUI)", false, 15)]
 		static public void SkeletonGraphicCreateMenuItem () {
 		static public void SkeletonGraphicCreateMenuItem () {
-			var parentGameObject = Selection.activeObject as GameObject;
-			var parentTransform = parentGameObject == null ? null : parentGameObject.GetComponent<RectTransform>();
+			GameObject parentGameObject = Selection.activeObject as GameObject;
+			RectTransform parentTransform = parentGameObject == null ? null : parentGameObject.GetComponent<RectTransform>();
 
 
 			if (parentTransform == null)
 			if (parentTransform == null)
 				Debug.LogWarning("Your new SkeletonGraphic will not be visible until it is placed under a Canvas");
 				Debug.LogWarning("Your new SkeletonGraphic will not be visible until it is placed under a Canvas");
 
 
-			var gameObject = NewSkeletonGraphicGameObject("New SkeletonGraphic");
+			GameObject gameObject = NewSkeletonGraphicGameObject("New SkeletonGraphic");
 			gameObject.transform.SetParent(parentTransform, false);
 			gameObject.transform.SetParent(parentTransform, false);
 			EditorUtility.FocusProjectWindow();
 			EditorUtility.FocusProjectWindow();
 			Selection.activeObject = gameObject;
 			Selection.activeObject = gameObject;
@@ -444,8 +445,8 @@ namespace Spine.Unity.Editor {
 
 
 		public static SkeletonGraphic InstantiateSkeletonGraphic (SkeletonDataAsset skeletonDataAsset, Skin skin = null) {
 		public static SkeletonGraphic InstantiateSkeletonGraphic (SkeletonDataAsset skeletonDataAsset, Skin skin = null) {
 			string spineGameObjectName = string.Format("SkeletonGraphic ({0})", skeletonDataAsset.name.Replace("_SkeletonData", ""));
 			string spineGameObjectName = string.Format("SkeletonGraphic ({0})", skeletonDataAsset.name.Replace("_SkeletonData", ""));
-			var go = NewSkeletonGraphicGameObject(spineGameObjectName);
-			var graphic = go.GetComponent<SkeletonGraphic>();
+			GameObject go = NewSkeletonGraphicGameObject(spineGameObjectName);
+			SkeletonGraphic graphic = go.GetComponent<SkeletonGraphic>();
 			graphic.skeletonDataAsset = skeletonDataAsset;
 			graphic.skeletonDataAsset = skeletonDataAsset;
 
 
 			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
 			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
@@ -472,15 +473,15 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static GameObject NewSkeletonGraphicGameObject (string gameObjectName) {
 		static GameObject NewSkeletonGraphicGameObject (string gameObjectName) {
-			var go = EditorInstantiation.NewGameObject(gameObjectName, true, typeof(RectTransform), typeof(CanvasRenderer), typeof(SkeletonGraphic));
-			var graphic = go.GetComponent<SkeletonGraphic>();
+			GameObject go = EditorInstantiation.NewGameObject(gameObjectName, true, typeof(RectTransform), typeof(CanvasRenderer), typeof(SkeletonGraphic));
+			SkeletonGraphic graphic = go.GetComponent<SkeletonGraphic>();
 			graphic.material = SkeletonGraphicInspector.DefaultSkeletonGraphicMaterial;
 			graphic.material = SkeletonGraphicInspector.DefaultSkeletonGraphicMaterial;
 			graphic.additiveMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicAdditiveMaterial;
 			graphic.additiveMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicAdditiveMaterial;
 			graphic.multiplyMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicMultiplyMaterial;
 			graphic.multiplyMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicMultiplyMaterial;
 			graphic.screenMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicScreenMaterial;
 			graphic.screenMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicScreenMaterial;
 
 
 #if HAS_CULL_TRANSPARENT_MESH
 #if HAS_CULL_TRANSPARENT_MESH
-			var canvasRenderer = go.GetComponent<CanvasRenderer>();
+			CanvasRenderer canvasRenderer = go.GetComponent<CanvasRenderer>();
 			canvasRenderer.cullTransparentMesh = false;
 			canvasRenderer.cullTransparentMesh = false;
 #endif
 #endif
 			return go;
 			return go;
@@ -503,13 +504,13 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected static Material FirstMaterialWithName (string name) {
 		protected static Material FirstMaterialWithName (string name) {
-			var guids = AssetDatabase.FindAssets(name + " t:material");
+			string[] guids = AssetDatabase.FindAssets(name + " t:material");
 			if (guids.Length <= 0) return null;
 			if (guids.Length <= 0) return null;
 
 
-			var firstAssetPath = AssetDatabase.GUIDToAssetPath(guids[0]);
+			string firstAssetPath = AssetDatabase.GUIDToAssetPath(guids[0]);
 			if (string.IsNullOrEmpty(firstAssetPath)) return null;
 			if (string.IsNullOrEmpty(firstAssetPath)) return null;
 
 
-			var firstMaterial = AssetDatabase.LoadAssetAtPath<Material>(firstAssetPath);
+			Material firstMaterial = AssetDatabase.LoadAssetAtPath<Material>(firstAssetPath);
 			return firstMaterial;
 			return firstMaterial;
 		}
 		}
 
 

+ 10 - 10
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonMecanimInspector.cs

@@ -78,9 +78,9 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected void AddRootMotionComponentIfEnabled () {
 		protected void AddRootMotionComponentIfEnabled () {
-			foreach (var t in targets) {
-				var component = t as Component;
-				var animator = component.GetComponent<Animator>();
+			foreach (UnityEngine.Object t in targets) {
+				Component component = t as Component;
+				Animator animator = component.GetComponent<Animator>();
 				if (animator != null && animator.applyRootMotion) {
 				if (animator != null && animator.applyRootMotion) {
 					if (component.GetComponent<SkeletonMecanimRootMotion>() == null) {
 					if (component.GetComponent<SkeletonMecanimRootMotion>() == null) {
 						component.gameObject.AddComponent<SkeletonMecanimRootMotion>();
 						component.gameObject.AddComponent<SkeletonMecanimRootMotion>();
@@ -95,11 +95,11 @@ namespace Spine.Unity.Editor {
 			float widthMixColumn = 84;
 			float widthMixColumn = 84;
 
 
 			using (new GUILayout.HorizontalScope()) {
 			using (new GUILayout.HorizontalScope()) {
-				var rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
+				Rect rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
 				rect.width = widthLayerColumn;
 				rect.width = widthLayerColumn;
 				EditorGUI.LabelField(rect, SpineInspectorUtility.TempContent("Mecanim Layer"), EditorStyles.boldLabel);
 				EditorGUI.LabelField(rect, SpineInspectorUtility.TempContent("Mecanim Layer"), EditorStyles.boldLabel);
 
 
-				var savedIndent = EditorGUI.indentLevel;
+				int savedIndent = EditorGUI.indentLevel;
 				EditorGUI.indentLevel = 0;
 				EditorGUI.indentLevel = 0;
 
 
 				rect.position += new Vector2(rect.width, 0);
 				rect.position += new Vector2(rect.width, 0);
@@ -115,14 +115,14 @@ namespace Spine.Unity.Editor {
 					using (new GUILayout.HorizontalScope()) {
 					using (new GUILayout.HorizontalScope()) {
 						string layerName = i < layerNames.Length ? layerNames[i] : ("Layer " + i);
 						string layerName = i < layerNames.Length ? layerNames[i] : ("Layer " + i);
 
 
-						var rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
+						Rect rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
 						rect.width = widthLayerColumn;
 						rect.width = widthLayerColumn;
 						EditorGUI.PrefixLabel(rect, SpineInspectorUtility.TempContent(layerName));
 						EditorGUI.PrefixLabel(rect, SpineInspectorUtility.TempContent(layerName));
 
 
-						var savedIndent = EditorGUI.indentLevel;
+						int savedIndent = EditorGUI.indentLevel;
 						EditorGUI.indentLevel = 0;
 						EditorGUI.indentLevel = 0;
 
 
-						var mixMode = layerMixModes.GetArrayElementAtIndex(i);
+						SerializedProperty mixMode = layerMixModes.GetArrayElementAtIndex(i);
 						rect.position += new Vector2(rect.width, 0);
 						rect.position += new Vector2(rect.width, 0);
 						rect.width = widthMixColumn;
 						rect.width = widthMixColumn;
 						EditorGUI.PropertyField(rect, mixMode, GUIContent.none);
 						EditorGUI.PropertyField(rect, mixMode, GUIContent.none);
@@ -137,7 +137,7 @@ namespace Spine.Unity.Editor {
 			int maxLayerCount = 0;
 			int maxLayerCount = 0;
 			int maxIndex = 0;
 			int maxIndex = 0;
 			for (int i = 0; i < targets.Length; ++i) {
 			for (int i = 0; i < targets.Length; ++i) {
-				var skeletonMecanim = ((SkeletonMecanim)targets[i]);
+				SkeletonMecanim skeletonMecanim = ((SkeletonMecanim)targets[i]);
 				int count = skeletonMecanim.Translator.MecanimLayerCount;
 				int count = skeletonMecanim.Translator.MecanimLayerCount;
 				if (count > maxLayerCount) {
 				if (count > maxLayerCount) {
 					maxLayerCount = count;
 					maxLayerCount = count;
@@ -146,7 +146,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 			if (maxLayerCount == 0)
 			if (maxLayerCount == 0)
 				return new string[0];
 				return new string[0];
-			var skeletonMecanimMaxLayers = ((SkeletonMecanim)targets[maxIndex]);
+			SkeletonMecanim skeletonMecanimMaxLayers = ((SkeletonMecanim)targets[maxIndex]);
 			return skeletonMecanimMaxLayers.Translator.MecanimLayerNames;
 			return skeletonMecanimMaxLayers.Translator.MecanimLayerNames;
 		}
 		}
 	}
 	}

+ 2 - 2
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonMecanimRootMotionInspector.cs

@@ -58,7 +58,7 @@ namespace Spine.Unity.Editor {
 			int maxLayerCount = 0;
 			int maxLayerCount = 0;
 			int maxIndex = 0;
 			int maxIndex = 0;
 			for (int i = 0; i < targets.Length; ++i) {
 			for (int i = 0; i < targets.Length; ++i) {
-				var skeletonMecanim = ((SkeletonMecanimRootMotion)targets[i]).SkeletonMecanim;
+				SkeletonMecanim skeletonMecanim = ((SkeletonMecanimRootMotion)targets[i]).SkeletonMecanim;
 				int count = skeletonMecanim.Translator.MecanimLayerCount;
 				int count = skeletonMecanim.Translator.MecanimLayerCount;
 				if (count > maxLayerCount) {
 				if (count > maxLayerCount) {
 					maxLayerCount = count;
 					maxLayerCount = count;
@@ -67,7 +67,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 			if (maxLayerCount == 0)
 			if (maxLayerCount == 0)
 				return new string[0];
 				return new string[0];
-			var skeletonMecanimMaxLayers = ((SkeletonMecanimRootMotion)targets[maxIndex]).SkeletonMecanim;
+			SkeletonMecanim skeletonMecanimMaxLayers = ((SkeletonMecanimRootMotion)targets[maxIndex]).SkeletonMecanim;
 			return skeletonMecanimMaxLayers.Translator.MecanimLayerNames;
 			return skeletonMecanimMaxLayers.Translator.MecanimLayerNames;
 		}
 		}
 
 

+ 4 - 4
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererCustomMaterialsInspector.cs

@@ -54,14 +54,14 @@ namespace Spine.Unity.Editor {
 		#region SkeletonRenderer context menu
 		#region SkeletonRenderer context menu
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials")]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials")]
 		static void AddSkeletonRendererCustomMaterials (MenuCommand menuCommand) {
 		static void AddSkeletonRendererCustomMaterials (MenuCommand menuCommand) {
-			var skeletonRenderer = (SkeletonRenderer)menuCommand.context;
-			var newComponent = skeletonRenderer.gameObject.AddComponent<SkeletonRendererCustomMaterials>();
+			SkeletonRenderer skeletonRenderer = (SkeletonRenderer)menuCommand.context;
+			SkeletonRendererCustomMaterials newComponent = skeletonRenderer.gameObject.AddComponent<SkeletonRendererCustomMaterials>();
 			Undo.RegisterCreatedObjectUndo(newComponent, "Add Basic Serialized Custom Materials");
 			Undo.RegisterCreatedObjectUndo(newComponent, "Add Basic Serialized Custom Materials");
 		}
 		}
 
 
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials", true)]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials", true)]
 		static bool AddSkeletonRendererCustomMaterials_Validate (MenuCommand menuCommand) {
 		static bool AddSkeletonRendererCustomMaterials_Validate (MenuCommand menuCommand) {
-			var skeletonRenderer = (SkeletonRenderer)menuCommand.context;
+			SkeletonRenderer skeletonRenderer = (SkeletonRenderer)menuCommand.context;
 			return (skeletonRenderer.GetComponent<SkeletonRendererCustomMaterials>() == null);
 			return (skeletonRenderer.GetComponent<SkeletonRendererCustomMaterials>() == null);
 		}
 		}
 		#endregion
 		#endregion
@@ -76,7 +76,7 @@ namespace Spine.Unity.Editor {
 
 
 		public override void OnInspectorGUI () {
 		public override void OnInspectorGUI () {
 			component = (SkeletonRendererCustomMaterials)target;
 			component = (SkeletonRendererCustomMaterials)target;
-			var skeletonRenderer = component.skeletonRenderer;
+			SkeletonRenderer skeletonRenderer = component.skeletonRenderer;
 
 
 			// Draw the default inspector
 			// Draw the default inspector
 			DrawDefaultInspector();
 			DrawDefaultInspector();

+ 39 - 38
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs

@@ -45,6 +45,7 @@
 #define HAS_ON_POSTPROCESS_PREFAB
 #define HAS_ON_POSTPROCESS_PREFAB
 #endif
 #endif
 
 
+using System.Reflection;
 using UnityEditor;
 using UnityEditor;
 using UnityEngine;
 using UnityEngine;
 
 
@@ -94,14 +95,14 @@ namespace Spine.Unity.Editor {
 		protected bool TargetIsValid {
 		protected bool TargetIsValid {
 			get {
 			get {
 				if (serializedObject.isEditingMultipleObjects) {
 				if (serializedObject.isEditingMultipleObjects) {
-					foreach (var o in targets) {
-						var component = (SkeletonRenderer)o;
+					foreach (UnityEngine.Object o in targets) {
+						SkeletonRenderer component = (SkeletonRenderer)o;
 						if (!component.valid)
 						if (!component.valid)
 							return false;
 							return false;
 					}
 					}
 					return true;
 					return true;
 				} else {
 				} else {
-					var component = (SkeletonRenderer)target;
+					SkeletonRenderer component = (SkeletonRenderer)target;
 					return component.valid;
 					return component.valid;
 				}
 				}
 			}
 			}
@@ -140,7 +141,7 @@ namespace Spine.Unity.Editor {
 			ClearMaterialButtonLabel = new GUIContent("Clear", "Clears unused material references. Note: when switching to the corresponding Mask Interaction mode at runtime, a new material is generated on the fly.");
 			ClearMaterialButtonLabel = new GUIContent("Clear", "Clears unused material references. Note: when switching to the corresponding Mask Interaction mode at runtime, a new material is generated on the fly.");
 			DeleteMaterialButtonLabel = new GUIContent("Delete", "Clears unused material references and deletes the corresponding assets. Note: when switching to the corresponding Mask Interaction mode at runtime, a new material is generated on the fly.");
 			DeleteMaterialButtonLabel = new GUIContent("Delete", "Clears unused material references and deletes the corresponding assets. Note: when switching to the corresponding Mask Interaction mode at runtime, a new material is generated on the fly.");
 
 
-			var so = this.serializedObject;
+			SerializedObject so = this.serializedObject;
 			skeletonDataAsset = so.FindProperty("skeletonDataAsset");
 			skeletonDataAsset = so.FindProperty("skeletonDataAsset");
 			initialSkinName = so.FindProperty("initialSkinName");
 			initialSkinName = so.FindProperty("initialSkinName");
 			initialFlipX = so.FindProperty("initialFlipX");
 			initialFlipX = so.FindProperty("initialFlipX");
@@ -171,16 +172,16 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public void OnSceneGUI () {
 		public void OnSceneGUI () {
-			var skeletonRenderer = (SkeletonRenderer)target;
+			SkeletonRenderer skeletonRenderer = (SkeletonRenderer)target;
 			if (loadingFailed)
 			if (loadingFailed)
 				return;
 				return;
 
 
-			var skeleton = skeletonRenderer.Skeleton;
+			Skeleton skeleton = skeletonRenderer.Skeleton;
 			if (skeleton == null) {
 			if (skeleton == null) {
 				loadingFailed = true;
 				loadingFailed = true;
 				return;
 				return;
 			}
 			}
-			var transform = skeletonRenderer.transform;
+			Transform transform = skeletonRenderer.transform;
 			if (skeleton == null) return;
 			if (skeleton == null) return;
 
 
 			SpineHandles.DrawBones(transform, skeleton);
 			SpineHandles.DrawBones(transform, skeleton);
@@ -193,7 +194,7 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.ApplyModifiedProperties() || SpineInspectorUtility.UndoRedoPerformed(Event.current) ||
 			if (serializedObject.ApplyModifiedProperties() || SpineInspectorUtility.UndoRedoPerformed(Event.current) ||
 				AreAnyMaskMaterialsMissing()) {
 				AreAnyMaskMaterialsMissing()) {
 				if (!Application.isPlaying) {
 				if (!Application.isPlaying) {
-					foreach (var o in targets)
+					foreach (UnityEngine.Object o in targets)
 						SpineEditorUtilities.ReinitializeComponent((SkeletonRenderer)o);
 						SpineEditorUtilities.ReinitializeComponent((SkeletonRenderer)o);
 					SceneView.RepaintAll();
 					SceneView.RepaintAll();
 				}
 				}
@@ -212,12 +213,12 @@ namespace Spine.Unity.Editor {
 			if (Event.current.type == EventType.Layout) {
 			if (Event.current.type == EventType.Layout) {
 				if (forceReloadQueued) {
 				if (forceReloadQueued) {
 					forceReloadQueued = false;
 					forceReloadQueued = false;
-					foreach (var c in targets) {
+					foreach (UnityEngine.Object c in targets) {
 						SpineEditorUtilities.ReloadSkeletonDataAssetAndComponent(c as SkeletonRenderer);
 						SpineEditorUtilities.ReloadSkeletonDataAssetAndComponent(c as SkeletonRenderer);
 					}
 					}
 				} else {
 				} else {
-					foreach (var c in targets) {
-						var component = c as SkeletonRenderer;
+					foreach (UnityEngine.Object c in targets) {
+						SkeletonRenderer component = c as SkeletonRenderer;
 						if (!component.valid) {
 						if (!component.valid) {
 							SpineEditorUtilities.ReinitializeComponent(component);
 							SpineEditorUtilities.ReinitializeComponent(component);
 							if (!component.valid) continue;
 							if (!component.valid) continue;
@@ -228,36 +229,36 @@ namespace Spine.Unity.Editor {
 #if BUILT_IN_SPRITE_MASK_COMPONENT
 #if BUILT_IN_SPRITE_MASK_COMPONENT
 				if (setMaskNoneMaterialsQueued) {
 				if (setMaskNoneMaterialsQueued) {
 					setMaskNoneMaterialsQueued = false;
 					setMaskNoneMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.None);
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.None);
 				}
 				}
 				if (setInsideMaskMaterialsQueued) {
 				if (setInsideMaskMaterialsQueued) {
 					setInsideMaskMaterialsQueued = false;
 					setInsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleInsideMask);
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleInsideMask);
 				}
 				}
 				if (setOutsideMaskMaterialsQueued) {
 				if (setOutsideMaskMaterialsQueued) {
 					setOutsideMaskMaterialsQueued = false;
 					setOutsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleOutsideMask);
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleOutsideMask);
 				}
 				}
 
 
 				if (deleteInsideMaskMaterialsQueued) {
 				if (deleteInsideMaskMaterialsQueued) {
 					deleteInsideMaskMaterialsQueued = false;
 					deleteInsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorDeleteMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleInsideMask);
 						EditorDeleteMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleInsideMask);
 				}
 				}
 				if (deleteOutsideMaskMaterialsQueued) {
 				if (deleteOutsideMaskMaterialsQueued) {
 					deleteOutsideMaskMaterialsQueued = false;
 					deleteOutsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorDeleteMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleOutsideMask);
 						EditorDeleteMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleOutsideMask);
 				}
 				}
 #endif
 #endif
 
 
 #if NO_PREFAB_MESH
 #if NO_PREFAB_MESH
 				if (isInspectingPrefab) {
 				if (isInspectingPrefab) {
-					foreach (var c in targets) {
-						var component = (SkeletonRenderer)c;
+					foreach (UnityEngine.Object c in targets) {
+						SkeletonRenderer component = (SkeletonRenderer)c;
 						MeshFilter meshFilter = component.GetComponent<MeshFilter>();
 						MeshFilter meshFilter = component.GetComponent<MeshFilter>();
 						if (meshFilter != null && meshFilter.sharedMesh != null)
 						if (meshFilter != null && meshFilter.sharedMesh != null)
 							meshFilter.sharedMesh = null;
 							meshFilter.sharedMesh = null;
@@ -268,7 +269,7 @@ namespace Spine.Unity.Editor {
 
 
 			bool valid = TargetIsValid;
 			bool valid = TargetIsValid;
 
 
-			foreach (var o in targets)
+			foreach (UnityEngine.Object o in targets)
 				ApplyModifiedMeshParameters(o as SkeletonRenderer);
 				ApplyModifiedMeshParameters(o as SkeletonRenderer);
 
 
 			// Fields.
 			// Fields.
@@ -282,7 +283,7 @@ namespace Spine.Unity.Editor {
 				if (valid) EditorGUILayout.PropertyField(initialSkinName, SpineInspectorUtility.TempContent("Initial Skin"));
 				if (valid) EditorGUILayout.PropertyField(initialSkinName, SpineInspectorUtility.TempContent("Initial Skin"));
 
 
 			} else {
 			} else {
-				var component = (SkeletonRenderer)target;
+				SkeletonRenderer component = (SkeletonRenderer)target;
 
 
 				using (new EditorGUILayout.HorizontalScope(EditorStyles.helpBox)) {
 				using (new EditorGUILayout.HorizontalScope(EditorStyles.helpBox)) {
 					SpineInspectorUtility.PropertyFieldFitLabel(skeletonDataAsset, SkeletonDataAssetLabel);
 					SpineInspectorUtility.PropertyFieldFitLabel(skeletonDataAsset, SkeletonDataAssetLabel);
@@ -413,13 +414,13 @@ namespace Spine.Unity.Editor {
 								// Support multi-edit SkeletonUtility button.
 								// Support multi-edit SkeletonUtility button.
 								//	EditorGUILayout.Space();
 								//	EditorGUILayout.Space();
 								//	bool addSkeletonUtility = GUILayout.Button(buttonContent, GUILayout.Height(30));
 								//	bool addSkeletonUtility = GUILayout.Button(buttonContent, GUILayout.Height(30));
-								//	foreach (var t in targets) {
-								//		var component = t as Component;
+								//	foreach (UnityEngine.Object t in targets) {
+								//		Component component = t as Component;
 								//		if (addSkeletonUtility && component.GetComponent<SkeletonUtility>() == null)
 								//		if (addSkeletonUtility && component.GetComponent<SkeletonUtility>() == null)
 								//			component.gameObject.AddComponent<SkeletonUtility>();
 								//			component.gameObject.AddComponent<SkeletonUtility>();
 								//	}
 								//	}
 							} else {
 							} else {
-								var component = (Component)target;
+								Component component = (Component)target;
 								if (component.GetComponent<SkeletonUtility>() == null) {
 								if (component.GetComponent<SkeletonUtility>() == null) {
 									if (SpineInspectorUtility.CenteredButton(SkeletonUtilityButtonContent, 21, true, 200f))
 									if (SpineInspectorUtility.CenteredButton(SkeletonUtilityButtonContent, 21, true, 200f))
 										component.gameObject.AddComponent<SkeletonUtility>();
 										component.gameObject.AddComponent<SkeletonUtility>();
@@ -459,8 +460,8 @@ namespace Spine.Unity.Editor {
 
 
 		public static void SkeletonRootMotionParameter (Object[] targets) {
 		public static void SkeletonRootMotionParameter (Object[] targets) {
 			int rootMotionComponentCount = 0;
 			int rootMotionComponentCount = 0;
-			foreach (var t in targets) {
-				var component = t as Component;
+			foreach (UnityEngine.Object t in targets) {
+				Component component = t as Component;
 				if (component.GetComponent<SkeletonRootMotion>() != null) {
 				if (component.GetComponent<SkeletonRootMotion>() != null) {
 					++rootMotionComponentCount;
 					++rootMotionComponentCount;
 				}
 				}
@@ -473,8 +474,8 @@ namespace Spine.Unity.Editor {
 
 
 				if (!allHaveRootMotion) {
 				if (!allHaveRootMotion) {
 					if (GUILayout.Button(SpineInspectorUtility.TempContent("Add Component", Icons.constraintTransform), GUILayout.MaxWidth(130), GUILayout.Height(18))) {
 					if (GUILayout.Button(SpineInspectorUtility.TempContent("Add Component", Icons.constraintTransform), GUILayout.MaxWidth(130), GUILayout.Height(18))) {
-						foreach (var t in targets) {
-							var component = t as Component;
+						foreach (UnityEngine.Object t in targets) {
+							Component component = t as Component;
 							if (component.GetComponent<SkeletonRootMotion>() == null) {
 							if (component.GetComponent<SkeletonRootMotion>() == null) {
 								component.gameObject.AddComponent<SkeletonRootMotion>();
 								component.gameObject.AddComponent<SkeletonRootMotion>();
 							}
 							}
@@ -483,9 +484,9 @@ namespace Spine.Unity.Editor {
 				}
 				}
 				if (anyHaveRootMotion) {
 				if (anyHaveRootMotion) {
 					if (GUILayout.Button(SpineInspectorUtility.TempContent("Remove Component", Icons.constraintTransform), GUILayout.MaxWidth(140), GUILayout.Height(18))) {
 					if (GUILayout.Button(SpineInspectorUtility.TempContent("Remove Component", Icons.constraintTransform), GUILayout.MaxWidth(140), GUILayout.Height(18))) {
-						foreach (var t in targets) {
-							var component = t as Component;
-							var rootMotionComponent = component.GetComponent<SkeletonRootMotion>();
+						foreach (UnityEngine.Object t in targets) {
+							Component component = t as Component;
+							SkeletonRootMotion rootMotionComponent = component.GetComponent<SkeletonRootMotion>();
 							if (rootMotionComponent != null) {
 							if (rootMotionComponent != null) {
 								DestroyImmediate(rootMotionComponent);
 								DestroyImmediate(rootMotionComponent);
 							}
 							}
@@ -496,12 +497,12 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public static void SetSeparatorSlotNames (SkeletonRenderer skeletonRenderer, string[] newSlotNames) {
 		public static void SetSeparatorSlotNames (SkeletonRenderer skeletonRenderer, string[] newSlotNames) {
-			var field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
+			FieldInfo field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
 			field.SetValue(skeletonRenderer, newSlotNames);
 			field.SetValue(skeletonRenderer, newSlotNames);
 		}
 		}
 
 
 		public static string[] GetSeparatorSlotNames (SkeletonRenderer skeletonRenderer) {
 		public static string[] GetSeparatorSlotNames (SkeletonRenderer skeletonRenderer) {
-			var field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
+			FieldInfo field = SpineInspectorUtility.GetNonPublicField(typeof(SkeletonRenderer), SeparatorSlotNamesFieldName);
 			return field.GetValue(skeletonRenderer) as string[];
 			return field.GetValue(skeletonRenderer) as string[];
 		}
 		}
 
 
@@ -509,8 +510,8 @@ namespace Spine.Unity.Editor {
 			bool multi = separatorSlotNames.serializedObject.isEditingMultipleObjects;
 			bool multi = separatorSlotNames.serializedObject.isEditingMultipleObjects;
 			bool hasTerminalSlot = false;
 			bool hasTerminalSlot = false;
 			if (!multi) {
 			if (!multi) {
-				var sr = separatorSlotNames.serializedObject.targetObject as ISkeletonComponent;
-				var skeleton = sr.Skeleton;
+				ISkeletonComponent sr = separatorSlotNames.serializedObject.targetObject as ISkeletonComponent;
+				Skeleton skeleton = sr.Skeleton;
 				int lastSlot = skeleton.Slots.Count - 1;
 				int lastSlot = skeleton.Slots.Count - 1;
 				if (skeleton != null) {
 				if (skeleton != null) {
 					for (int i = 0, n = separatorSlotNames.arraySize; i < n; i++) {
 					for (int i = 0, n = separatorSlotNames.arraySize; i < n; i++) {
@@ -579,7 +580,7 @@ namespace Spine.Unity.Editor {
 			if (!Application.isPlaying && Event.current.type == EventType.Layout && !initialSkinName.hasMultipleDifferentValues) {
 			if (!Application.isPlaying && Event.current.type == EventType.Layout && !initialSkinName.hasMultipleDifferentValues) {
 				bool mismatchDetected = false;
 				bool mismatchDetected = false;
 				string newSkinName = initialSkinName.stringValue;
 				string newSkinName = initialSkinName.stringValue;
-				foreach (var o in targets) {
+				foreach (UnityEngine.Object o in targets) {
 					mismatchDetected |= UpdateIfSkinMismatch((SkeletonRenderer)o, newSkinName);
 					mismatchDetected |= UpdateIfSkinMismatch((SkeletonRenderer)o, newSkinName);
 				}
 				}
 
 
@@ -593,7 +594,7 @@ namespace Spine.Unity.Editor {
 		static bool UpdateIfSkinMismatch (SkeletonRenderer skeletonRenderer, string componentSkinName) {
 		static bool UpdateIfSkinMismatch (SkeletonRenderer skeletonRenderer, string componentSkinName) {
 			if (!skeletonRenderer.valid || skeletonRenderer.EditorSkipSkinSync) return false;
 			if (!skeletonRenderer.valid || skeletonRenderer.EditorSkipSkinSync) return false;
 
 
-			var skin = skeletonRenderer.Skeleton.Skin;
+			Skin skin = skeletonRenderer.Skeleton.Skin;
 			string skeletonSkinName = skin != null ? skin.Name : null;
 			string skeletonSkinName = skin != null ? skin.Name : null;
 			bool defaultCase = skin == null && string.IsNullOrEmpty(componentSkinName);
 			bool defaultCase = skin == null && string.IsNullOrEmpty(componentSkinName);
 			bool fieldMatchesSkin = defaultCase || string.Equals(componentSkinName, skeletonSkinName, System.StringComparison.Ordinal);
 			bool fieldMatchesSkin = defaultCase || string.Equals(componentSkinName, skeletonSkinName, System.StringComparison.Ordinal);
@@ -619,8 +620,8 @@ namespace Spine.Unity.Editor {
 
 
 		bool AreAnyMaskMaterialsMissing () {
 		bool AreAnyMaskMaterialsMissing () {
 #if BUILT_IN_SPRITE_MASK_COMPONENT
 #if BUILT_IN_SPRITE_MASK_COMPONENT
-			foreach (var o in targets) {
-				var component = (SkeletonRenderer)o;
+			foreach (UnityEngine.Object o in targets) {
+				SkeletonRenderer component = (SkeletonRenderer)o;
 				if (!component.valid)
 				if (!component.valid)
 					continue;
 					continue;
 				if (SpineMaskUtilities.AreMaskMaterialsMissing(component))
 				if (SpineMaskUtilities.AreMaskMaterialsMissing(component))

+ 2 - 2
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRootMotionBaseInspector.cs

@@ -135,8 +135,8 @@ namespace Spine.Unity.Editor {
 		protected void DisplayWarnings () {
 		protected void DisplayWarnings () {
 			bool usesRigidbodyPhysics = rigidBody.objectReferenceValue != null || rigidBody2D.objectReferenceValue != null;
 			bool usesRigidbodyPhysics = rigidBody.objectReferenceValue != null || rigidBody2D.objectReferenceValue != null;
 			if (usesRigidbodyPhysics) {
 			if (usesRigidbodyPhysics) {
-				var rootMotionComponent = (SkeletonRootMotionBase)serializedObject.targetObject;
-				var skeletonComponent = rootMotionComponent ? rootMotionComponent.TargetSkeletonAnimationComponent : null;
+				SkeletonRootMotionBase rootMotionComponent = (SkeletonRootMotionBase)serializedObject.targetObject;
+				ISkeletonAnimation skeletonComponent = rootMotionComponent ? rootMotionComponent.TargetSkeletonAnimationComponent : null;
 				if (skeletonComponent != null && skeletonComponent.UpdateTiming == UpdateTiming.InUpdate) {
 				if (skeletonComponent != null && skeletonComponent.UpdateTiming == UpdateTiming.InUpdate) {
 					string warningMessage = "Skeleton component uses 'Advanced - Animation Update' mode 'In Update'.\n" +
 					string warningMessage = "Skeleton component uses 'Advanced - Animation Update' mode 'In Update'.\n" +
 						"When using a Rigidbody, 'In FixedUpdate' is recommended instead.";
 						"When using a Rigidbody, 'In FixedUpdate' is recommended instead.";

+ 38 - 38
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityBoneInspector.cs

@@ -85,7 +85,7 @@ namespace Spine.Unity.Editor {
 			if (multiObject) return;
 			if (multiObject) return;
 			if (utilityBone.bone == null) return;
 			if (utilityBone.bone == null) return;
 
 
-			var skeleton = utilityBone.bone.Skeleton;
+			Skeleton skeleton = utilityBone.bone.Skeleton;
 			int slotCount = skeleton.Slots.Count;
 			int slotCount = skeleton.Slots.Count;
 			Skin skin = skeleton.Skin;
 			Skin skin = skeleton.Skin;
 			if (skeleton.Skin == null)
 			if (skeleton.Skin == null)
@@ -94,13 +94,13 @@ namespace Spine.Unity.Editor {
 			for (int i = 0; i < slotCount; i++) {
 			for (int i = 0; i < slotCount; i++) {
 				Slot slot = skeletonUtility.Skeleton.Slots.Items[i];
 				Slot slot = skeletonUtility.Skeleton.Slots.Items[i];
 				if (slot.Bone == utilityBone.bone) {
 				if (slot.Bone == utilityBone.bone) {
-					var slotAttachments = new List<Skin.SkinEntry>();
+					List<Skin.SkinEntry> slotAttachments = new List<Skin.SkinEntry>();
 					int slotIndex = skeleton.Data.FindSlot(slot.Data.Name).Index;
 					int slotIndex = skeleton.Data.FindSlot(slot.Data.Name).Index;
 					skin.GetAttachments(slotIndex, slotAttachments);
 					skin.GetAttachments(slotIndex, slotAttachments);
 
 
-					var boundingBoxes = new List<BoundingBoxAttachment>();
-					foreach (var att in slotAttachments) {
-						var boundingBoxAttachment = att.Attachment as BoundingBoxAttachment;
+					List<BoundingBoxAttachment> boundingBoxes = new List<BoundingBoxAttachment>();
+					foreach (Skin.SkinEntry entry in slotAttachments) {
+						BoundingBoxAttachment boundingBoxAttachment = entry.Attachment as BoundingBoxAttachment;
 						if (boundingBoxAttachment != null)
 						if (boundingBoxAttachment != null)
 							boundingBoxes.Add(boundingBoxAttachment);
 							boundingBoxes.Add(boundingBoxAttachment);
 					}
 					}
@@ -118,7 +118,7 @@ namespace Spine.Unity.Editor {
 			} else {
 			} else {
 				int boneCount = 0;
 				int boneCount = 0;
 				foreach (Object o in Selection.objects) {
 				foreach (Object o in Selection.objects) {
-					var go = o as GameObject;
+					GameObject go = o as GameObject;
 					if (go != null) {
 					if (go != null) {
 						SkeletonUtilityBone sub = go.GetComponent<SkeletonUtilityBone>();
 						SkeletonUtilityBone sub = go.GetComponent<SkeletonUtilityBone>();
 						if (sub != null) {
 						if (sub != null) {
@@ -198,29 +198,29 @@ namespace Spine.Unity.Editor {
 			using (new EditorGUI.DisabledGroupScope(multiObject || boundingBoxTable.Count == 0)) {
 			using (new EditorGUI.DisabledGroupScope(multiObject || boundingBoxTable.Count == 0)) {
 				EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Bounding Boxes", Icons.boundingBox), EditorStyles.boldLabel);
 				EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Bounding Boxes", Icons.boundingBox), EditorStyles.boldLabel);
 
 
-				foreach (var entry in boundingBoxTable) {
+				foreach (KeyValuePair<Slot, List<BoundingBoxAttachment>> entry in boundingBoxTable) {
 					Slot slot = entry.Key;
 					Slot slot = entry.Key;
-					var boundingBoxes = entry.Value;
+					List<BoundingBoxAttachment> boundingBoxes = entry.Value;
 
 
 					EditorGUI.indentLevel++;
 					EditorGUI.indentLevel++;
 					EditorGUILayout.LabelField(slot.Data.Name);
 					EditorGUILayout.LabelField(slot.Data.Name);
 					EditorGUI.indentLevel++;
 					EditorGUI.indentLevel++;
 					{
 					{
-						foreach (var box in boundingBoxes) {
+						foreach (BoundingBoxAttachment box in boundingBoxes) {
 							using (new GUILayout.HorizontalScope()) {
 							using (new GUILayout.HorizontalScope()) {
 								GUILayout.Space(30);
 								GUILayout.Space(30);
 								string buttonLabel = box.IsWeighted() ? box.Name + " (!)" : box.Name;
 								string buttonLabel = box.IsWeighted() ? box.Name + " (!)" : box.Name;
 								if (GUILayout.Button(buttonLabel, GUILayout.Width(200))) {
 								if (GUILayout.Button(buttonLabel, GUILayout.Width(200))) {
 									utilityBone.bone.Skeleton.UpdateWorldTransform();
 									utilityBone.bone.Skeleton.UpdateWorldTransform();
-									var bbTransform = utilityBone.transform.Find("[BoundingBox]" + box.Name); // Use FindChild in older versions of Unity.
+									Transform bbTransform = utilityBone.transform.Find("[BoundingBox]" + box.Name); // Use FindChild in older versions of Unity.
 									if (bbTransform != null) {
 									if (bbTransform != null) {
-										var originalCollider = bbTransform.GetComponent<PolygonCollider2D>();
+										PolygonCollider2D originalCollider = bbTransform.GetComponent<PolygonCollider2D>();
 										if (originalCollider != null)
 										if (originalCollider != null)
 											SkeletonUtility.SetColliderPointsLocal(originalCollider, slot, box);
 											SkeletonUtility.SetColliderPointsLocal(originalCollider, slot, box);
 										else
 										else
 											SkeletonUtility.AddBoundingBoxAsComponent(box, slot, bbTransform.gameObject);
 											SkeletonUtility.AddBoundingBoxAsComponent(box, slot, bbTransform.gameObject);
 									} else {
 									} else {
-										var newPolygonCollider = SkeletonUtility.AddBoundingBoxGameObject(null, box, slot, utilityBone.transform);
+										PolygonCollider2D newPolygonCollider = SkeletonUtility.AddBoundingBoxGameObject(null, box, slot, utilityBone.transform);
 										bbTransform = newPolygonCollider.transform;
 										bbTransform = newPolygonCollider.transform;
 									}
 									}
 									EditorGUIUtility.PingObject(bbTransform);
 									EditorGUIUtility.PingObject(bbTransform);
@@ -240,7 +240,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void BoneSelectorContextMenu (string current, ExposedList<Bone> bones, string topValue, GenericMenu.MenuFunction2 callback) {
 		static void BoneSelectorContextMenu (string current, ExposedList<Bone> bones, string topValue, GenericMenu.MenuFunction2 callback) {
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 
 
 			if (topValue != "")
 			if (topValue != "")
 				menu.AddItem(new GUIContent(topValue), current == topValue, callback, null);
 				menu.AddItem(new GUIContent(topValue), current == topValue, callback, null);
@@ -256,7 +256,7 @@ namespace Spine.Unity.Editor {
 				boneName.stringValue = "";
 				boneName.stringValue = "";
 				serializedObject.ApplyModifiedProperties();
 				serializedObject.ApplyModifiedProperties();
 			} else {
 			} else {
-				var bone = (Bone)obj;
+				Bone bone = (Bone)obj;
 				boneName.stringValue = bone.Data.Name;
 				boneName.stringValue = bone.Data.Name;
 				serializedObject.ApplyModifiedProperties();
 				serializedObject.ApplyModifiedProperties();
 				utilityBone.Reset();
 				utilityBone.Reset();
@@ -266,14 +266,14 @@ namespace Spine.Unity.Editor {
 		void SpawnChildBoneSelected (object obj) {
 		void SpawnChildBoneSelected (object obj) {
 			if (obj == null) {
 			if (obj == null) {
 				// Add recursively
 				// Add recursively
-				foreach (var bone in utilityBone.bone.Children) {
+				foreach (Bone bone in utilityBone.bone.Children) {
 					GameObject go = skeletonUtility.SpawnBoneRecursively(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale);
 					GameObject go = skeletonUtility.SpawnBoneRecursively(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale);
 					SkeletonUtilityBone[] newUtilityBones = go.GetComponentsInChildren<SkeletonUtilityBone>();
 					SkeletonUtilityBone[] newUtilityBones = go.GetComponentsInChildren<SkeletonUtilityBone>();
 					foreach (SkeletonUtilityBone utilBone in newUtilityBones)
 					foreach (SkeletonUtilityBone utilBone in newUtilityBones)
 						SkeletonUtilityInspector.AttachIcon(utilBone);
 						SkeletonUtilityInspector.AttachIcon(utilBone);
 				}
 				}
 			} else {
 			} else {
-				var bone = (Bone)obj;
+				Bone bone = (Bone)obj;
 				GameObject go = skeletonUtility.SpawnBone(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale);
 				GameObject go = skeletonUtility.SpawnBone(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale);
 				SkeletonUtilityInspector.AttachIcon(go.GetComponent<SkeletonUtilityBone>());
 				SkeletonUtilityInspector.AttachIcon(go.GetComponent<SkeletonUtilityBone>());
 				Selection.activeGameObject = go;
 				Selection.activeGameObject = go;
@@ -297,13 +297,13 @@ namespace Spine.Unity.Editor {
 			if (utilityBone.bone != null && utilityBone.bone.Children.Count == 0)
 			if (utilityBone.bone != null && utilityBone.bone.Children.Count == 0)
 				return false;
 				return false;
 
 
-			var rigidbodies = utilityBone.GetComponentsInChildren<Rigidbody>();
-			var rigidbodies2D = utilityBone.GetComponentsInChildren<Rigidbody2D>();
+			Rigidbody[] rigidbodies = utilityBone.GetComponentsInChildren<Rigidbody>();
+			Rigidbody2D[] rigidbodies2D = utilityBone.GetComponentsInChildren<Rigidbody2D>();
 			return rigidbodies.Length <= 0 && rigidbodies2D.Length <= 0;
 			return rigidbodies.Length <= 0 && rigidbodies2D.Length <= 0;
 		}
 		}
 
 
 		void CreateHingeChain2D () {
 		void CreateHingeChain2D () {
-			var kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
+			SkeletonUtilityBone kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
 			if (kinematicParentUtilityBone == null) {
 			if (kinematicParentUtilityBone == null) {
 				UnityEditor.EditorUtility.DisplayDialog("No parent SkeletonUtilityBone found!", "Please select the first physically moving chain node, having a parent GameObject with a SkeletonUtilityBone component attached.", "OK");
 				UnityEditor.EditorUtility.DisplayDialog("No parent SkeletonUtilityBone found!", "Please select the first physically moving chain node, having a parent GameObject with a SkeletonUtilityBone component attached.", "OK");
 				return;
 				return;
@@ -318,7 +318,7 @@ namespace Spine.Unity.Editor {
 			kinematicParentUtilityBone.position = kinematicParentUtilityBone.rotation = kinematicParentUtilityBone.scale = kinematicParentUtilityBone.zPosition = true;
 			kinematicParentUtilityBone.position = kinematicParentUtilityBone.rotation = kinematicParentUtilityBone.scale = kinematicParentUtilityBone.zPosition = true;
 
 
 			GameObject commonParentObject = new GameObject(skeletonUtility.name + " HingeChain Parent " + utilityBone.name);
 			GameObject commonParentObject = new GameObject(skeletonUtility.name + " HingeChain Parent " + utilityBone.name);
-			var commonParentActivateOnFlip = commonParentObject.AddComponent<ActivateBasedOnFlipDirection>();
+			ActivateBasedOnFlipDirection commonParentActivateOnFlip = commonParentObject.AddComponent<ActivateBasedOnFlipDirection>();
 			commonParentActivateOnFlip.skeletonRenderer = skeletonUtility.skeletonRenderer;
 			commonParentActivateOnFlip.skeletonRenderer = skeletonUtility.skeletonRenderer;
 			commonParentActivateOnFlip.skeletonGraphic = skeletonUtility.skeletonGraphic;
 			commonParentActivateOnFlip.skeletonGraphic = skeletonUtility.skeletonGraphic;
 
 
@@ -328,13 +328,13 @@ namespace Spine.Unity.Editor {
 			normalChainParentObject.transform.SetParent(commonParentObject.transform);
 			normalChainParentObject.transform.SetParent(commonParentObject.transform);
 			commonParentActivateOnFlip.activeOnNormalX = normalChainParentObject;
 			commonParentActivateOnFlip.activeOnNormalX = normalChainParentObject;
 
 
-			//var followRotationComponent = normalChainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
+			//FollowSkeletonUtilityRootRotation followRotationComponent = normalChainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
 			//followRotationComponent.reference = skeletonUtility.boneRoot;
 			//followRotationComponent.reference = skeletonUtility.boneRoot;
 
 
 			// Follower Kinematic Rigidbody
 			// Follower Kinematic Rigidbody
 			GameObject followerKinematicObject = new GameObject(kinematicParentUtilityBone.name + " Follower");
 			GameObject followerKinematicObject = new GameObject(kinematicParentUtilityBone.name + " Follower");
 			followerKinematicObject.transform.parent = normalChainParentObject.transform;
 			followerKinematicObject.transform.parent = normalChainParentObject.transform;
-			var followerRigidbody = followerKinematicObject.AddComponent<Rigidbody2D>();
+			Rigidbody2D followerRigidbody = followerKinematicObject.AddComponent<Rigidbody2D>();
 			followerRigidbody.mass = mass;
 			followerRigidbody.mass = mass;
 			followerRigidbody.isKinematic = true;
 			followerRigidbody.isKinematic = true;
 			followerKinematicObject.AddComponent<FollowLocationRigidbody2D>().reference = kinematicParentUtilityBone.transform;
 			followerKinematicObject.AddComponent<FollowLocationRigidbody2D>().reference = kinematicParentUtilityBone.transform;
@@ -342,10 +342,10 @@ namespace Spine.Unity.Editor {
 			followerKinematicObject.transform.rotation = kinematicParentUtilityBone.transform.rotation;
 			followerKinematicObject.transform.rotation = kinematicParentUtilityBone.transform.rotation;
 
 
 			// Child Bones
 			// Child Bones
-			var utilityBones = utilityBone.GetComponentsInChildren<SkeletonUtilityBone>();
-			var childBoneParentReference = followerKinematicObject.transform;
+			SkeletonUtilityBone[] utilityBones = utilityBone.GetComponentsInChildren<SkeletonUtilityBone>();
+			Transform childBoneParentReference = followerKinematicObject.transform;
 			for (int i = 0; i < utilityBones.Length; ++i) {
 			for (int i = 0; i < utilityBones.Length; ++i) {
-				var childBone = utilityBones[i];
+				SkeletonUtilityBone childBone = utilityBones[i];
 				mass *= 0.75f;
 				mass *= 0.75f;
 				childBone.parentReference = (i == 0) ? kinematicParentUtilityBone.transform : childBoneParentReference;
 				childBone.parentReference = (i == 0) ? kinematicParentUtilityBone.transform : childBoneParentReference;
 				childBone.transform.SetParent(normalChainParentObject.transform, true); // we need a flat hierarchy of all Joint objects in Unity.
 				childBone.transform.SetParent(normalChainParentObject.transform, true); // we need a flat hierarchy of all Joint objects in Unity.
@@ -398,21 +398,21 @@ namespace Spine.Unity.Editor {
 
 
 			commonParentActivateOnFlip.activeOnFlippedX = mirroredChain;
 			commonParentActivateOnFlip.activeOnFlippedX = mirroredChain;
 
 
-			var followerKinematicObject = mirroredChain.GetComponentInChildren<FollowLocationRigidbody2D>();
+			FollowLocationRigidbody2D followerKinematicObject = mirroredChain.GetComponentInChildren<FollowLocationRigidbody2D>();
 			followerKinematicObject.followFlippedX = true;
 			followerKinematicObject.followFlippedX = true;
 			FlipBone2DHorizontal(followerKinematicObject.transform, skeletonUtilityRoot);
 			FlipBone2DHorizontal(followerKinematicObject.transform, skeletonUtilityRoot);
 
 
-			var childBoneJoints = mirroredChain.GetComponentsInChildren<HingeJoint2D>();
+			HingeJoint2D[] childBoneJoints = mirroredChain.GetComponentsInChildren<HingeJoint2D>();
 			Transform prevRotatedChild = null;
 			Transform prevRotatedChild = null;
 			Transform parentTransformForAngles = followerKinematicObject.transform;
 			Transform parentTransformForAngles = followerKinematicObject.transform;
 			for (int i = 0; i < childBoneJoints.Length; ++i) {
 			for (int i = 0; i < childBoneJoints.Length; ++i) {
-				var joint = childBoneJoints[i];
+				HingeJoint2D joint = childBoneJoints[i];
 				FlipBone2DHorizontal(joint.transform, skeletonUtilityRoot);
 				FlipBone2DHorizontal(joint.transform, skeletonUtilityRoot);
 				ApplyJoint2DAngleLimits(joint, rotationLimit, parentTransformForAngles, joint.transform);
 				ApplyJoint2DAngleLimits(joint, rotationLimit, parentTransformForAngles, joint.transform);
 
 
 				GameObject rotatedChild = GameObject.Instantiate(joint.gameObject, joint.transform, true);
 				GameObject rotatedChild = GameObject.Instantiate(joint.gameObject, joint.transform, true);
 				rotatedChild.name = joint.name + " rotated";
 				rotatedChild.name = joint.name + " rotated";
-				var rotationEulerAngles = rotatedChild.transform.localEulerAngles;
+				Vector3 rotationEulerAngles = rotatedChild.transform.localEulerAngles;
 				rotationEulerAngles.x = 180;
 				rotationEulerAngles.x = 180;
 				rotatedChild.transform.localEulerAngles = rotationEulerAngles;
 				rotatedChild.transform.localEulerAngles = rotationEulerAngles;
 				DestroyImmediate(rotatedChild.GetComponent<HingeJoint2D>());
 				DestroyImmediate(rotatedChild.GetComponent<HingeJoint2D>());
@@ -422,7 +422,7 @@ namespace Spine.Unity.Editor {
 				DestroyImmediate(joint.gameObject.GetComponent<SkeletonUtilityBone>());
 				DestroyImmediate(joint.gameObject.GetComponent<SkeletonUtilityBone>());
 
 
 				if (i > 0) {
 				if (i > 0) {
-					var utilityBone = rotatedChild.GetComponent<SkeletonUtilityBone>();
+					SkeletonUtilityBone utilityBone = rotatedChild.GetComponent<SkeletonUtilityBone>();
 					utilityBone.parentReference = prevRotatedChild;
 					utilityBone.parentReference = prevRotatedChild;
 				}
 				}
 				prevRotatedChild = rotatedChild.transform;
 				prevRotatedChild = rotatedChild.transform;
@@ -445,7 +445,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		void CreateHingeChain () {
 		void CreateHingeChain () {
-			var kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
+			SkeletonUtilityBone kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
 			if (kinematicParentUtilityBone == null) {
 			if (kinematicParentUtilityBone == null) {
 				UnityEditor.EditorUtility.DisplayDialog("No parent SkeletonUtilityBone found!", "Please select the first physically moving chain node, having a parent GameObject with a SkeletonUtilityBone component attached.", "OK");
 				UnityEditor.EditorUtility.DisplayDialog("No parent SkeletonUtilityBone found!", "Please select the first physically moving chain node, having a parent GameObject with a SkeletonUtilityBone component attached.", "OK");
 				return;
 				return;
@@ -459,13 +459,13 @@ namespace Spine.Unity.Editor {
 			// HingeChain Parent
 			// HingeChain Parent
 			// Needs to be on top hierarchy level (not attached to the moving skeleton at least) for physics to apply proper momentum.
 			// Needs to be on top hierarchy level (not attached to the moving skeleton at least) for physics to apply proper momentum.
 			GameObject chainParentObject = new GameObject(skeletonUtility.name + " HingeChain Parent " + utilityBone.name);
 			GameObject chainParentObject = new GameObject(skeletonUtility.name + " HingeChain Parent " + utilityBone.name);
-			var followRotationComponent = chainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
+			FollowSkeletonUtilityRootRotation followRotationComponent = chainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
 			followRotationComponent.reference = skeletonUtility.boneRoot;
 			followRotationComponent.reference = skeletonUtility.boneRoot;
 
 
 			// Follower Kinematic Rigidbody
 			// Follower Kinematic Rigidbody
 			GameObject followerKinematicObject = new GameObject(kinematicParentUtilityBone.name + " Follower");
 			GameObject followerKinematicObject = new GameObject(kinematicParentUtilityBone.name + " Follower");
 			followerKinematicObject.transform.parent = chainParentObject.transform;
 			followerKinematicObject.transform.parent = chainParentObject.transform;
-			var followerRigidbody = followerKinematicObject.AddComponent<Rigidbody>();
+			Rigidbody followerRigidbody = followerKinematicObject.AddComponent<Rigidbody>();
 			followerRigidbody.mass = 10;
 			followerRigidbody.mass = 10;
 			followerRigidbody.isKinematic = true;
 			followerRigidbody.isKinematic = true;
 			followerKinematicObject.AddComponent<FollowLocationRigidbody>().reference = kinematicParentUtilityBone.transform;
 			followerKinematicObject.AddComponent<FollowLocationRigidbody>().reference = kinematicParentUtilityBone.transform;
@@ -473,9 +473,9 @@ namespace Spine.Unity.Editor {
 			followerKinematicObject.transform.rotation = kinematicParentUtilityBone.transform.rotation;
 			followerKinematicObject.transform.rotation = kinematicParentUtilityBone.transform.rotation;
 
 
 			// Child Bones
 			// Child Bones
-			var utilityBones = utilityBone.GetComponentsInChildren<SkeletonUtilityBone>();
-			var childBoneParentReference = followerKinematicObject.transform;
-			foreach (var childBone in utilityBones) {
+			SkeletonUtilityBone[] utilityBones = utilityBone.GetComponentsInChildren<SkeletonUtilityBone>();
+			Transform childBoneParentReference = followerKinematicObject.transform;
+			foreach (SkeletonUtilityBone childBone in utilityBones) {
 				childBone.parentReference = childBoneParentReference;
 				childBone.parentReference = childBoneParentReference;
 				childBone.transform.SetParent(chainParentObject.transform, true); // we need a flat hierarchy of all Joint objects in Unity.
 				childBone.transform.SetParent(chainParentObject.transform, true); // we need a flat hierarchy of all Joint objects in Unity.
 				AttachRigidbodyAndCollider(childBone);
 				AttachRigidbodyAndCollider(childBone);
@@ -523,12 +523,12 @@ namespace Spine.Unity.Editor {
 		static void AttachRigidbodyAndCollider2D (SkeletonUtilityBone utilBone, bool enableCollider = false) {
 		static void AttachRigidbodyAndCollider2D (SkeletonUtilityBone utilBone, bool enableCollider = false) {
 			if (utilBone.GetComponent<Collider2D>() == null) {
 			if (utilBone.GetComponent<Collider2D>() == null) {
 				if (utilBone.bone.Data.Length == 0) {
 				if (utilBone.bone.Data.Length == 0) {
-					var sphere = utilBone.gameObject.AddComponent<CircleCollider2D>();
+					CircleCollider2D sphere = utilBone.gameObject.AddComponent<CircleCollider2D>();
 					sphere.radius = 0.1f;
 					sphere.radius = 0.1f;
 					sphere.enabled = enableCollider;
 					sphere.enabled = enableCollider;
 				} else {
 				} else {
 					float length = utilBone.bone.Data.Length;
 					float length = utilBone.bone.Data.Length;
-					var box = utilBone.gameObject.AddComponent<BoxCollider2D>();
+					BoxCollider2D box = utilBone.gameObject.AddComponent<BoxCollider2D>();
 					box.size = new Vector3(length, length / 3f, 0.2f);
 					box.size = new Vector3(length, length / 3f, 0.2f);
 					box.offset = new Vector3(length / 2f, 0, 0);
 					box.offset = new Vector3(length / 2f, 0, 0);
 					box.enabled = enableCollider;
 					box.enabled = enableCollider;

+ 3 - 3
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityInspector.cs

@@ -129,7 +129,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		void SpawnHierarchyContextMenu () {
 		void SpawnHierarchyContextMenu () {
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 
 
 			menu.AddItem(new GUIContent("Follow all bones"), false, SpawnFollowHierarchy);
 			menu.AddItem(new GUIContent("Follow all bones"), false, SpawnFollowHierarchy);
 			menu.AddItem(new GUIContent("Follow (Root Only)"), false, SpawnFollowHierarchyRootOnly);
 			menu.AddItem(new GUIContent("Follow (Root Only)"), false, SpawnFollowHierarchyRootOnly);
@@ -161,8 +161,8 @@ namespace Spine.Unity.Editor {
 
 
 		static void AttachIconsToChildren (Transform root) {
 		static void AttachIconsToChildren (Transform root) {
 			if (root != null) {
 			if (root != null) {
-				var utilityBones = root.GetComponentsInChildren<SkeletonUtilityBone>();
-				foreach (var utilBone in utilityBones)
+				SkeletonUtilityBone[] utilityBones = root.GetComponentsInChildren<SkeletonUtilityBone>();
+				foreach (SkeletonUtilityBone utilBone in utilityBones)
 					AttachIcon(utilBone);
 					AttachIcon(utilBone);
 			}
 			}
 		}
 		}

+ 3 - 3
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineShaderWithOutlineGUI.cs

@@ -133,7 +133,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
 			EditorGUI.showMixedValue = mixedValue;
 			EditorGUI.showMixedValue = mixedValue;
 			EditorGUI.BeginChangeCheck();
 			EditorGUI.BeginChangeCheck();
 
 
-			var origFontStyle = EditorStyles.label.fontStyle;
+			FontStyle origFontStyle = EditorStyles.label.fontStyle;
 			EditorStyles.label.fontStyle = FontStyle.Bold;
 			EditorStyles.label.fontStyle = FontStyle.Bold;
 			isOutlineEnabled = EditorGUILayout.Toggle(_EnableOutlineText, isOutlineEnabled);
 			isOutlineEnabled = EditorGUILayout.Toggle(_EnableOutlineText, isOutlineEnabled);
 			EditorStyles.label.fontStyle = origFontStyle;
 			EditorStyles.label.fontStyle = origFontStyle;
@@ -144,7 +144,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
 				}
 				}
 			}
 			}
 		} else {
 		} else {
-			var origFontStyle = EditorStyles.label.fontStyle;
+			FontStyle origFontStyle = EditorStyles.label.fontStyle;
 			EditorStyles.label.fontStyle = FontStyle.Bold;
 			EditorStyles.label.fontStyle = FontStyle.Bold;
 			EditorGUILayout.LabelField(_EnableOutlineText);
 			EditorGUILayout.LabelField(_EnableOutlineText);
 			EditorStyles.label.fontStyle = origFontStyle;
 			EditorStyles.label.fontStyle = origFontStyle;
@@ -174,7 +174,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
 
 
 	void SwitchShaderToOutlineSettings (Material material, bool enableOutline) {
 	void SwitchShaderToOutlineSettings (Material material, bool enableOutline) {
 
 
-		var shaderName = material.shader.name;
+		string shaderName = material.shader.name;
 		bool isSetToOutlineShader = shaderName.Contains(ShaderOutlineNamePrefix);
 		bool isSetToOutlineShader = shaderName.Contains(ShaderOutlineNamePrefix);
 		if (isSetToOutlineShader && !enableOutline) {
 		if (isSetToOutlineShader && !enableOutline) {
 			shaderName = shaderName.Replace(ShaderOutlineNamePrefix, ShaderNormalNamePrefix);
 			shaderName = shaderName.Replace(ShaderOutlineNamePrefix, ShaderNormalNamePrefix);

+ 2 - 2
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs

@@ -434,7 +434,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
 		}
 		}
 
 
 		EditorGUI.BeginChangeCheck();
 		EditorGUI.BeginChangeCheck();
-		var culling = (eCulling)Mathf.RoundToInt(_culling.floatValue);
+		eCulling culling = (eCulling)Mathf.RoundToInt(_culling.floatValue);
 		EditorGUI.showMixedValue = _culling.hasMixedValue;
 		EditorGUI.showMixedValue = _culling.hasMixedValue;
 		culling = (eCulling)EditorGUILayout.Popup(_cullingModeText, (int)culling, _cullingModeOptions);
 		culling = (eCulling)EditorGUILayout.Popup(_cullingModeText, (int)culling, _cullingModeOptions);
 		if (EditorGUI.EndChangeCheck()) {
 		if (EditorGUI.EndChangeCheck()) {
@@ -885,7 +885,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
 	#region Private Functions
 	#region Private Functions
 
 
 	void RenderMeshInfoBox () {
 	void RenderMeshInfoBox () {
-		var material = (Material)_materialEditor.target;
+		Material material = (Material)_materialEditor.target;
 		bool requiresNormals = _fixedNormal != null && GetMaterialNormalsMode(material) == eNormalsMode.MeshNormals;
 		bool requiresNormals = _fixedNormal != null && GetMaterialNormalsMode(material) == eNormalsMode.MeshNormals;
 		bool requiresTangents = material.HasProperty("_BumpMap") && material.GetTexture("_BumpMap") != null;
 		bool requiresTangents = material.HasProperty("_BumpMap") && material.GetTexture("_BumpMap") != null;
 
 

+ 39 - 39
spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineAttributeDrawers.cs

@@ -106,11 +106,11 @@ namespace Spine.Unity.Editor {
 			SerializedProperty dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
 			SerializedProperty dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
 
 
 			if (dataField != null) {
 			if (dataField != null) {
-				var objectReferenceValue = dataField.objectReferenceValue;
+				UnityEngine.Object objectReferenceValue = dataField.objectReferenceValue;
 				if (objectReferenceValue is SkeletonDataAsset) {
 				if (objectReferenceValue is SkeletonDataAsset) {
 					skeletonDataAsset = (SkeletonDataAsset)objectReferenceValue;
 					skeletonDataAsset = (SkeletonDataAsset)objectReferenceValue;
 				} else if (objectReferenceValue is IHasSkeletonDataAsset) {
 				} else if (objectReferenceValue is IHasSkeletonDataAsset) {
-					var hasSkeletonDataAsset = (IHasSkeletonDataAsset)objectReferenceValue;
+					IHasSkeletonDataAsset hasSkeletonDataAsset = (IHasSkeletonDataAsset)objectReferenceValue;
 					if (hasSkeletonDataAsset != null)
 					if (hasSkeletonDataAsset != null)
 						skeletonDataAsset = hasSkeletonDataAsset.SkeletonDataAsset;
 						skeletonDataAsset = hasSkeletonDataAsset.SkeletonDataAsset;
 				} else if (objectReferenceValue != null) {
 				} else if (objectReferenceValue != null) {
@@ -119,11 +119,11 @@ namespace Spine.Unity.Editor {
 				}
 				}
 
 
 			} else {
 			} else {
-				var targetObject = property.serializedObject.targetObject;
+				UnityEngine.Object targetObject = property.serializedObject.targetObject;
 
 
 				IHasSkeletonDataAsset hasSkeletonDataAsset = targetObject as IHasSkeletonDataAsset;
 				IHasSkeletonDataAsset hasSkeletonDataAsset = targetObject as IHasSkeletonDataAsset;
 				if (hasSkeletonDataAsset == null) {
 				if (hasSkeletonDataAsset == null) {
-					var component = targetObject as Component;
+					Component component = targetObject as Component;
 					if (component != null)
 					if (component != null)
 						hasSkeletonDataAsset = component.GetComponentInChildren(typeof(IHasSkeletonDataAsset)) as IHasSkeletonDataAsset;
 						hasSkeletonDataAsset = component.GetComponentInChildren(typeof(IHasSkeletonDataAsset)) as IHasSkeletonDataAsset;
 				}
 				}
@@ -154,14 +154,14 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public ISkeletonComponent GetTargetSkeletonComponent (SerializedProperty property) {
 		public ISkeletonComponent GetTargetSkeletonComponent (SerializedProperty property) {
-			var dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
+			SerializedProperty dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
 
 
 			if (dataField != null) {
 			if (dataField != null) {
-				var skeletonComponent = dataField.objectReferenceValue as ISkeletonComponent;
+				ISkeletonComponent skeletonComponent = dataField.objectReferenceValue as ISkeletonComponent;
 				if (dataField.objectReferenceValue != null && skeletonComponent != null) // note the overloaded UnityEngine.Object == null check. Do not simplify.
 				if (dataField.objectReferenceValue != null && skeletonComponent != null) // note the overloaded UnityEngine.Object == null check. Do not simplify.
 					return skeletonComponent;
 					return skeletonComponent;
 			} else {
 			} else {
-				var component = property.serializedObject.targetObject as Component;
+				Component component = property.serializedObject.targetObject as Component;
 				if (component != null)
 				if (component != null)
 					return component.GetComponentInChildren(typeof(ISkeletonComponent)) as ISkeletonComponent;
 					return component.GetComponentInChildren(typeof(ISkeletonComponent)) as ISkeletonComponent;
 			}
 			}
@@ -173,7 +173,7 @@ namespace Spine.Unity.Editor {
 			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
 			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
 			if (data == null) return;
 			if (data == null) return;
 
 
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 			PopulateMenu(menu, property, this.TargetAttribute, data);
 			PopulateMenu(menu, property, this.TargetAttribute, data);
 			menu.ShowAsContext();
 			menu.ShowAsContext();
 		}
 		}
@@ -181,8 +181,8 @@ namespace Spine.Unity.Editor {
 		protected abstract void PopulateMenu (GenericMenu menu, SerializedProperty property, T targetAttribute, SkeletonData data);
 		protected abstract void PopulateMenu (GenericMenu menu, SerializedProperty property, T targetAttribute, SkeletonData data);
 
 
 		protected virtual void HandleSelect (object menuItemObject) {
 		protected virtual void HandleSelect (object menuItemObject) {
-			var clickedItem = (SpineDrawerValuePair)menuItemObject;
-			var serializedProperty = clickedItem.property;
+			SpineDrawerValuePair clickedItem = (SpineDrawerValuePair)menuItemObject;
+			SerializedProperty serializedProperty = clickedItem.property;
 			if (serializedProperty.serializedObject.isEditingMultipleObjects) serializedProperty.stringValue = "oaifnoiasf��123526"; // HACK: to trigger change on multi-editing.
 			if (serializedProperty.serializedObject.isEditingMultipleObjects) serializedProperty.stringValue = "oaifnoiasf��123526"; // HACK: to trigger change on multi-editing.
 			serializedProperty.stringValue = clickedItem.stringValue;
 			serializedProperty.stringValue = clickedItem.stringValue;
 			serializedProperty.serializedObject.ApplyModifiedProperties();
 			serializedProperty.serializedObject.ApplyModifiedProperties();
@@ -214,14 +214,14 @@ namespace Spine.Unity.Editor {
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 
 
 					if (targetAttribute.containsBoundingBoxes) {
 					if (targetAttribute.containsBoundingBoxes) {
-						var skinEntries = new List<Skin.SkinEntry>();
-						foreach (var skin in data.Skins) {
+						List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
+						foreach (Skin skin in data.Skins) {
 							skin.GetAttachments(slotIndex, skinEntries);
 							skin.GetAttachments(slotIndex, skinEntries);
 						}
 						}
 
 
 						bool hasBoundingBox = false;
 						bool hasBoundingBox = false;
-						foreach (var entry in skinEntries) {
-							var bbAttachment = entry.Attachment as BoundingBoxAttachment;
+						foreach (Skin.SkinEntry entry in skinEntries) {
+							BoundingBoxAttachment bbAttachment = entry.Attachment as BoundingBoxAttachment;
 							if (bbAttachment != null) {
 							if (bbAttachment != null) {
 								string menuLabel = bbAttachment.IsWeighted() ? name + " (!)" : name;
 								string menuLabel = bbAttachment.IsWeighted() ? name + " (!)" : name;
 								menu.AddItem(new GUIContent(menuLabel), !property.hasMultipleDifferentValues && name == property.stringValue, HandleSelect, new SpineDrawerValuePair(name, property));
 								menu.AddItem(new GUIContent(menuLabel), !property.hasMultipleDifferentValues && name == property.stringValue, HandleSelect, new SpineDrawerValuePair(name, property));
@@ -261,19 +261,19 @@ namespace Spine.Unity.Editor {
 			if (outputNames == null) return;
 			if (outputNames == null) return;
 			if (outputMenuItems == null) return;
 			if (outputMenuItems == null) return;
 
 
-			var skins = data.Skins;
+			ExposedList<Skin> skins = data.Skins;
 
 
 			outputNames.Clear();
 			outputNames.Clear();
 			outputMenuItems.Clear();
 			outputMenuItems.Clear();
 
 
-			var icon = SpineEditorUtilities.Icons.skin;
+			Texture2D icon = SpineEditorUtilities.Icons.skin;
 
 
 			if (includeNone) {
 			if (includeNone) {
 				outputNames.Add("");
 				outputNames.Add("");
 				outputMenuItems.Add(new GUIContent(NoneStringConstant, icon));
 				outputMenuItems.Add(new GUIContent(NoneStringConstant, icon));
 			}
 			}
 
 
-			foreach (var s in skins) {
+			foreach (Skin s in skins) {
 				string skinName = s.Name;
 				string skinName = s.Name;
 				outputNames.Add(skinName);
 				outputNames.Add(skinName);
 				outputMenuItems.Add(new GUIContent(skinName, icon));
 				outputMenuItems.Add(new GUIContent(skinName, icon));
@@ -311,7 +311,7 @@ namespace Spine.Unity.Editor {
 			if (outputNames == null) return;
 			if (outputNames == null) return;
 			if (outputMenuItems == null) return;
 			if (outputMenuItems == null) return;
 
 
-			var animations = data.Animations;
+			ExposedList<Animation> animations = data.Animations;
 
 
 			outputNames.Clear();
 			outputNames.Clear();
 			outputMenuItems.Clear();
 			outputMenuItems.Clear();
@@ -321,7 +321,7 @@ namespace Spine.Unity.Editor {
 				outputMenuItems.Add(new GUIContent(NoneStringConstant, SpineEditorUtilities.Icons.animation));
 				outputMenuItems.Add(new GUIContent(NoneStringConstant, SpineEditorUtilities.Icons.animation));
 			}
 			}
 
 
-			foreach (var a in animations) {
+			foreach (Animation a in animations) {
 				string animationName = a.Name;
 				string animationName = a.Name;
 				outputNames.Add(animationName);
 				outputNames.Add(animationName);
 				outputMenuItems.Add(new GUIContent(animationName, SpineEditorUtilities.Icons.animation));
 				outputMenuItems.Add(new GUIContent(animationName, SpineEditorUtilities.Icons.animation));
@@ -329,7 +329,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineAnimation targetAttribute, SkeletonData data) {
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineAnimation targetAttribute, SkeletonData data) {
-			var animations = skeletonDataAsset.GetAnimationStateData().SkeletonData.Animations;
+			ExposedList<Animation> animations = skeletonDataAsset.GetAnimationStateData().SkeletonData.Animations;
 
 
 			if (TargetAttribute.includeNone)
 			if (TargetAttribute.includeNone)
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
@@ -355,7 +355,7 @@ namespace Spine.Unity.Editor {
 		public static void GetEventMenuItems (SkeletonData data, List<string> eventNames, List<GUIContent> menuItems, bool includeNone = true) {
 		public static void GetEventMenuItems (SkeletonData data, List<string> eventNames, List<GUIContent> menuItems, bool includeNone = true) {
 			if (data == null) return;
 			if (data == null) return;
 
 
-			var animations = data.Events;
+			ExposedList<EventData> animations = data.Events;
 
 
 			eventNames.Clear();
 			eventNames.Clear();
 			menuItems.Clear();
 			menuItems.Clear();
@@ -365,7 +365,7 @@ namespace Spine.Unity.Editor {
 				menuItems.Add(new GUIContent(NoneStringConstant, SpineEditorUtilities.Icons.userEvent));
 				menuItems.Add(new GUIContent(NoneStringConstant, SpineEditorUtilities.Icons.userEvent));
 			}
 			}
 
 
-			foreach (var a in animations) {
+			foreach (EventData a in animations) {
 				string animationName = a.Name;
 				string animationName = a.Name;
 				eventNames.Add(animationName);
 				eventNames.Add(animationName);
 				menuItems.Add(new GUIContent(animationName, SpineEditorUtilities.Icons.userEvent));
 				menuItems.Add(new GUIContent(animationName, SpineEditorUtilities.Icons.userEvent));
@@ -373,13 +373,13 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineEvent targetAttribute, SkeletonData data) {
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineEvent targetAttribute, SkeletonData data) {
-			var events = skeletonDataAsset.GetSkeletonData(false).Events;
+			ExposedList<EventData> events = skeletonDataAsset.GetSkeletonData(false).Events;
 
 
 			if (TargetAttribute.includeNone)
 			if (TargetAttribute.includeNone)
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 
 
 			for (int i = 0; i < events.Count; i++) {
 			for (int i = 0; i < events.Count; i++) {
-				var eventObject = events.Items[i];
+				EventData eventObject = events.Items[i];
 				string name = eventObject.Name;
 				string name = eventObject.Name;
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 					if (!TargetAttribute.audioOnly || !string.IsNullOrEmpty(eventObject.AudioPath)) {
 					if (!TargetAttribute.audioOnly || !string.IsNullOrEmpty(eventObject.AudioPath)) {
@@ -402,7 +402,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineIkConstraint targetAttribute, SkeletonData data) {
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineIkConstraint targetAttribute, SkeletonData data) {
-			var constraints = skeletonDataAsset.GetSkeletonData(false).IkConstraints;
+			ExposedList<IkConstraintData> constraints = skeletonDataAsset.GetSkeletonData(false).IkConstraints;
 
 
 			if (TargetAttribute.includeNone)
 			if (TargetAttribute.includeNone)
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
@@ -426,7 +426,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineTransformConstraint targetAttribute, SkeletonData data) {
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineTransformConstraint targetAttribute, SkeletonData data) {
-			var constraints = skeletonDataAsset.GetSkeletonData(false).TransformConstraints;
+			ExposedList<TransformConstraintData> constraints = skeletonDataAsset.GetSkeletonData(false).TransformConstraints;
 
 
 			if (TargetAttribute.includeNone)
 			if (TargetAttribute.includeNone)
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
@@ -449,7 +449,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpinePathConstraint targetAttribute, SkeletonData data) {
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpinePathConstraint targetAttribute, SkeletonData data) {
-			var constraints = skeletonDataAsset.GetSkeletonData(false).PathConstraints;
+			ExposedList<PathConstraintData> constraints = skeletonDataAsset.GetSkeletonData(false).PathConstraints;
 
 
 			if (TargetAttribute.includeNone)
 			if (TargetAttribute.includeNone)
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
@@ -469,12 +469,12 @@ namespace Spine.Unity.Editor {
 
 
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineAttachment targetAttribute, SkeletonData data) {
 		protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineAttachment targetAttribute, SkeletonData data) {
 			ISkeletonComponent skeletonComponent = GetTargetSkeletonComponent(property);
 			ISkeletonComponent skeletonComponent = GetTargetSkeletonComponent(property);
-			var validSkins = new List<Skin>();
+			List<Skin> validSkins = new List<Skin>();
 
 
 			if (skeletonComponent != null && targetAttribute.currentSkinOnly) {
 			if (skeletonComponent != null && targetAttribute.currentSkinOnly) {
 				Skin currentSkin = null;
 				Skin currentSkin = null;
 
 
-				var skinProperty = property.FindBaseOrSiblingProperty(targetAttribute.skinField);
+				SerializedProperty skinProperty = property.FindBaseOrSiblingProperty(targetAttribute.skinField);
 				if (skinProperty != null) currentSkin = skeletonComponent.Skeleton.Data.FindSkin(skinProperty.stringValue);
 				if (skinProperty != null) currentSkin = skeletonComponent.Skeleton.Data.FindSkin(skinProperty.stringValue);
 
 
 				currentSkin = currentSkin ?? skeletonComponent.Skeleton.Skin;
 				currentSkin = currentSkin ?? skeletonComponent.Skeleton.Skin;
@@ -488,8 +488,8 @@ namespace Spine.Unity.Editor {
 					if (skin != null) validSkins.Add(skin);
 					if (skin != null) validSkins.Add(skin);
 			}
 			}
 
 
-			var attachmentNames = new List<string>();
-			var placeholderNames = new List<string>();
+			List<string> attachmentNames = new List<string>();
+			List<string> placeholderNames = new List<string>();
 			string prefix = "";
 			string prefix = "";
 
 
 			if (skeletonComponent != null && targetAttribute.currentSkinOnly)
 			if (skeletonComponent != null && targetAttribute.currentSkinOnly)
@@ -505,7 +505,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			Skin defaultSkin = data.Skins.Items[0];
 			Skin defaultSkin = data.Skins.Items[0];
-			var slotProperty = property.FindBaseOrSiblingProperty(TargetAttribute.slotField);
+			SerializedProperty slotProperty = property.FindBaseOrSiblingProperty(TargetAttribute.slotField);
 
 
 			string slotMatch = "";
 			string slotMatch = "";
 			if (slotProperty != null) {
 			if (slotProperty != null) {
@@ -526,19 +526,19 @@ namespace Spine.Unity.Editor {
 					attachmentNames.Clear();
 					attachmentNames.Clear();
 					placeholderNames.Clear();
 					placeholderNames.Clear();
 
 
-					var skinEntries = new List<Skin.SkinEntry>();
+					List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 					skin.GetAttachments(i, skinEntries);
 					skin.GetAttachments(i, skinEntries);
-					foreach (var entry in skinEntries) {
+					foreach (Skin.SkinEntry entry in skinEntries) {
 						attachmentNames.Add(entry.Name);
 						attachmentNames.Add(entry.Name);
 					}
 					}
 
 
 					if (skin != defaultSkin) {
 					if (skin != defaultSkin) {
-						foreach (var entry in skinEntries) {
+						foreach (Skin.SkinEntry entry in skinEntries) {
 							placeholderNames.Add(entry.Name);
 							placeholderNames.Add(entry.Name);
 						}
 						}
 						skinEntries.Clear();
 						skinEntries.Clear();
 						defaultSkin.GetAttachments(i, skinEntries);
 						defaultSkin.GetAttachments(i, skinEntries);
-						foreach (var entry in skinEntries) {
+						foreach (Skin.SkinEntry entry in skinEntries) {
 							attachmentNames.Add(entry.Name);
 							attachmentNames.Add(entry.Name);
 						}
 						}
 					}
 					}
@@ -581,12 +581,12 @@ namespace Spine.Unity.Editor {
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 				menu.AddItem(new GUIContent(NoneString), !property.hasMultipleDifferentValues && string.IsNullOrEmpty(property.stringValue), HandleSelect, new SpineDrawerValuePair(string.Empty, property));
 
 
 			for (int i = 0; i < data.Bones.Count; i++) {
 			for (int i = 0; i < data.Bones.Count; i++) {
-				var bone = data.Bones.Items[i];
+				BoneData bone = data.Bones.Items[i];
 				string name = bone.Name;
 				string name = bone.Name;
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 					// jointName = "root/hip/bone" to show a hierarchial tree.
 					// jointName = "root/hip/bone" to show a hierarchial tree.
 					string jointName = name;
 					string jointName = name;
-					var iterator = bone;
+					BoneData iterator = bone;
 					while ((iterator = iterator.Parent) != null)
 					while ((iterator = iterator.Parent) != null)
 						jointName = string.Format("{0}/{1}", iterator.Name, jointName);
 						jointName = string.Format("{0}/{1}", iterator.Name, jointName);
 
 
@@ -649,7 +649,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void HandleSelect (object val) {
 		static void HandleSelect (object val) {
-			var pair = (SpineDrawerValuePair)val;
+			SpineDrawerValuePair pair = (SpineDrawerValuePair)val;
 			pair.property.stringValue = pair.stringValue;
 			pair.property.stringValue = pair.stringValue;
 			pair.property.serializedObject.ApplyModifiedProperties();
 			pair.property.serializedObject.ApplyModifiedProperties();
 		}
 		}

+ 46 - 46
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs

@@ -146,7 +146,7 @@ namespace Spine.Unity.Editor {
 			if (root == null || !root.ContainsKey("skins"))
 			if (root == null || !root.ContainsKey("skins"))
 				return new List<string>();
 				return new List<string>();
 
 
-			var skinsList = root["skins"] as List<object>;
+			List<object> skinsList = root["skins"] as List<object>;
 			if (skinsList == null)
 			if (skinsList == null)
 				return new List<string>();
 				return new List<string>();
 
 
@@ -271,7 +271,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			public RegionAttachment NewRegionAttachment (Skin skin, string name, string path, Sequence sequence) {
 			public RegionAttachment NewRegionAttachment (Skin skin, string name, string path, Sequence sequence) {
-				var regionAttachment = new RegionAttachment(name);
+				RegionAttachment regionAttachment = new RegionAttachment(name);
 				if (sequence != null)
 				if (sequence != null)
 					LoadSequence(path, sequence);
 					LoadSequence(path, sequence);
 				else {
 				else {
@@ -282,7 +282,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			public MeshAttachment NewMeshAttachment (Skin skin, string name, string path, Sequence sequence) {
 			public MeshAttachment NewMeshAttachment (Skin skin, string name, string path, Sequence sequence) {
-				var meshAttachment = new MeshAttachment(name);
+				MeshAttachment meshAttachment = new MeshAttachment(name);
 				if (sequence != null)
 				if (sequence != null)
 					LoadSequence(path, sequence);
 					LoadSequence(path, sequence);
 				else {
 				else {
@@ -325,9 +325,9 @@ namespace Spine.Unity.Editor {
 		public static void ImportSpineContent (string[] imported, List<string> texturesWithoutMetaFile,
 		public static void ImportSpineContent (string[] imported, List<string> texturesWithoutMetaFile,
 			bool reimport = false) {
 			bool reimport = false) {
 
 
-			var atlasPaths = new List<string>();
-			var imagePaths = new List<string>();
-			var skeletonPaths = new List<PathAndProblemInfo>();
+			List<string> atlasPaths = new List<string>();
+			List<string> imagePaths = new List<string>();
+			List<PathAndProblemInfo> skeletonPaths = new List<PathAndProblemInfo>();
 			CompatibilityProblemInfo compatibilityProblemInfo = null;
 			CompatibilityProblemInfo compatibilityProblemInfo = null;
 
 
 			foreach (string str in imported) {
 			foreach (string str in imported) {
@@ -352,7 +352,7 @@ namespace Spine.Unity.Editor {
 					imagePaths.Add(str);
 					imagePaths.Add(str);
 					break;
 					break;
 				case ".json": {
 				case ".json": {
-					var jsonAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
+					TextAsset jsonAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
 					string problemDescription = null;
 					string problemDescription = null;
 					if (jsonAsset != null && IsSpineData(jsonAsset, out compatibilityProblemInfo, ref problemDescription))
 					if (jsonAsset != null && IsSpineData(jsonAsset, out compatibilityProblemInfo, ref problemDescription))
 						skeletonPaths.Add(new PathAndProblemInfo(str, compatibilityProblemInfo, problemDescription));
 						skeletonPaths.Add(new PathAndProblemInfo(str, compatibilityProblemInfo, problemDescription));
@@ -362,7 +362,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 				case ".bytes": {
 				case ".bytes": {
 					if (str.ToLower().EndsWith(".skel.bytes", System.StringComparison.Ordinal)) {
 					if (str.ToLower().EndsWith(".skel.bytes", System.StringComparison.Ordinal)) {
-						var binaryAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
+						TextAsset binaryAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
 						string problemDescription = null;
 						string problemDescription = null;
 						if (IsSpineData(binaryAsset, out compatibilityProblemInfo, ref problemDescription))
 						if (IsSpineData(binaryAsset, out compatibilityProblemInfo, ref problemDescription))
 							skeletonPaths.Add(new PathAndProblemInfo(str, compatibilityProblemInfo, problemDescription));
 							skeletonPaths.Add(new PathAndProblemInfo(str, compatibilityProblemInfo, problemDescription));
@@ -377,7 +377,7 @@ namespace Spine.Unity.Editor {
 			AddDependentAtlasIfImageChanged(atlasPaths, imagePaths);
 			AddDependentAtlasIfImageChanged(atlasPaths, imagePaths);
 
 
 			// Import atlases first.
 			// Import atlases first.
-			var newAtlases = new List<AtlasAssetBase>();
+			List<AtlasAssetBase> newAtlases = new List<AtlasAssetBase>();
 			foreach (string ap in atlasPaths) {
 			foreach (string ap in atlasPaths) {
 #if PROBLEMATIC_PACKAGE_ASSET_MODIFICATION
 #if PROBLEMATIC_PACKAGE_ASSET_MODIFICATION
 				if (ap.StartsWith("Packages"))
 				if (ap.StartsWith("Packages"))
@@ -391,9 +391,9 @@ namespace Spine.Unity.Editor {
 
 
 			// Import skeletons and match them with atlases.
 			// Import skeletons and match them with atlases.
 			bool abortSkeletonImport = false;
 			bool abortSkeletonImport = false;
-			foreach (var skeletonPathEntry in skeletonPaths) {
+			foreach (PathAndProblemInfo skeletonPathEntry in skeletonPaths) {
 				string skeletonPath = skeletonPathEntry.path;
 				string skeletonPath = skeletonPathEntry.path;
-				var compatibilityProblems = skeletonPathEntry.compatibilityProblems;
+				CompatibilityProblemInfo compatibilityProblems = skeletonPathEntry.compatibilityProblems;
 				string otherProblemDescription = skeletonPathEntry.otherProblemDescription;
 				string otherProblemDescription = skeletonPathEntry.otherProblemDescription;
 #if PROBLEMATIC_PACKAGE_ASSET_MODIFICATION
 #if PROBLEMATIC_PACKAGE_ASSET_MODIFICATION
 				if (skeletonPath.StartsWith("Packages"))
 				if (skeletonPath.StartsWith("Packages"))
@@ -404,7 +404,7 @@ namespace Spine.Unity.Editor {
 					continue;
 					continue;
 				}
 				}
 
 
-				var loadedAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath);
+				TextAsset loadedAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath);
 				if (compatibilityProblems != null) {
 				if (compatibilityProblems != null) {
 					IngestIncompatibleSpineProject(loadedAsset, compatibilityProblems);
 					IngestIncompatibleSpineProject(loadedAsset, compatibilityProblems);
 					continue;
 					continue;
@@ -456,7 +456,7 @@ namespace Spine.Unity.Editor {
 
 
 			if (atlasPaths.Count > 0 || imagePaths.Count > 0 || skeletonPaths.Count > 0) {
 			if (atlasPaths.Count > 0 || imagePaths.Count > 0 || skeletonPaths.Count > 0) {
 				SkeletonDataAssetInspector[] skeletonDataInspectors = Resources.FindObjectsOfTypeAll<SkeletonDataAssetInspector>();
 				SkeletonDataAssetInspector[] skeletonDataInspectors = Resources.FindObjectsOfTypeAll<SkeletonDataAssetInspector>();
-				foreach (var inspector in skeletonDataInspectors) {
+				foreach (SkeletonDataAssetInspector inspector in skeletonDataInspectors) {
 					inspector.UpdateSkeletonData();
 					inspector.UpdateSkeletonData();
 				}
 				}
 			}
 			}
@@ -467,11 +467,11 @@ namespace Spine.Unity.Editor {
 			// have their skeletonGraphic.skeletonDataAsset reference corrupted
 			// have their skeletonGraphic.skeletonDataAsset reference corrupted
 			// by the instance of the ScriptableObject being destroyed but still assigned.
 			// by the instance of the ScriptableObject being destroyed but still assigned.
 			// Here we restore broken skeletonGraphic.skeletonDataAsset references.
 			// Here we restore broken skeletonGraphic.skeletonDataAsset references.
-			var skeletonGraphicObjects = Resources.FindObjectsOfTypeAll(typeof(SkeletonGraphic)) as SkeletonGraphic[];
-			foreach (var skeletonGraphic in skeletonGraphicObjects) {
+			SkeletonGraphic[] skeletonGraphicObjects = Resources.FindObjectsOfTypeAll(typeof(SkeletonGraphic)) as SkeletonGraphic[];
+			foreach (SkeletonGraphic skeletonGraphic in skeletonGraphicObjects) {
 
 
 				if (skeletonGraphic.skeletonDataAsset == null) {
 				if (skeletonGraphic.skeletonDataAsset == null) {
-					var skeletonGraphicID = skeletonGraphic.GetInstanceID();
+					int skeletonGraphicID = skeletonGraphic.GetInstanceID();
 					if (SpineEditorUtilities.DataReloadHandler.savedSkeletonDataAssetAtSKeletonGraphicID.ContainsKey(skeletonGraphicID)) {
 					if (SpineEditorUtilities.DataReloadHandler.savedSkeletonDataAssetAtSKeletonGraphicID.ContainsKey(skeletonGraphicID)) {
 						string assetPath = SpineEditorUtilities.DataReloadHandler.savedSkeletonDataAssetAtSKeletonGraphicID[skeletonGraphicID];
 						string assetPath = SpineEditorUtilities.DataReloadHandler.savedSkeletonDataAssetAtSKeletonGraphicID[skeletonGraphicID];
 						skeletonGraphic.skeletonDataAsset = (SkeletonDataAsset)AssetDatabase.LoadAssetAtPath<SkeletonDataAsset>(assetPath);
 						skeletonGraphic.skeletonDataAsset = (SkeletonDataAsset)AssetDatabase.LoadAssetAtPath<SkeletonDataAsset>(assetPath);
@@ -481,7 +481,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void AddDependentAtlasIfImageChanged (List<string> atlasPaths, List<string> imagePaths) {
 		static void AddDependentAtlasIfImageChanged (List<string> atlasPaths, List<string> imagePaths) {
-			foreach (var imagePath in imagePaths) {
+			foreach (string imagePath in imagePaths) {
 				string atlasPath = imagePath.Replace(".png", ".atlas.txt");
 				string atlasPath = imagePath.Replace(".png", ".atlas.txt");
 				if (!System.IO.File.Exists(atlasPath))
 				if (!System.IO.File.Exists(atlasPath))
 					continue;
 					continue;
@@ -493,7 +493,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void AddDependentSkeletonIfAtlasChanged (List<PathAndProblemInfo> skeletonPaths, List<string> atlasPaths) {
 		static void AddDependentSkeletonIfAtlasChanged (List<PathAndProblemInfo> skeletonPaths, List<string> atlasPaths) {
-			foreach (var atlasPath in atlasPaths) {
+			foreach (string atlasPath in atlasPaths) {
 				string skeletonPathJson = atlasPath.Replace(".atlas.txt", ".json");
 				string skeletonPathJson = atlasPath.Replace(".atlas.txt", ".json");
 				string skeletonPathBinary = atlasPath.Replace(".atlas.txt", ".skel.bytes");
 				string skeletonPathBinary = atlasPath.Replace(".atlas.txt", ".skel.bytes");
 				string usedSkeletonPath = System.IO.File.Exists(skeletonPathJson) ? skeletonPathJson :
 				string usedSkeletonPath = System.IO.File.Exists(skeletonPathJson) ? skeletonPathJson :
@@ -517,10 +517,10 @@ namespace Spine.Unity.Editor {
 			DirectoryInfo dirInfo = new DirectoryInfo(dir);
 			DirectoryInfo dirInfo = new DirectoryInfo(dir);
 			FileInfo[] files = dirInfo.GetFiles("*.asset");
 			FileInfo[] files = dirInfo.GetFiles("*.asset");
 
 
-			foreach (var f in files) {
+			foreach (FileInfo f in files) {
 				string localPath = dir + "/" + f.Name;
 				string localPath = dir + "/" + f.Name;
-				var obj = AssetDatabase.LoadAssetAtPath(localPath, typeof(Object));
-				var skeletonDataAsset = obj as SkeletonDataAsset;
+				UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(localPath, typeof(Object));
+				SkeletonDataAsset skeletonDataAsset = obj as SkeletonDataAsset;
 				if (skeletonDataAsset != null) {
 				if (skeletonDataAsset != null) {
 					if (skeletonDataAsset.skeletonJSON == textAsset) {
 					if (skeletonDataAsset.skeletonJSON == textAsset) {
 						if (Selection.activeObject == skeletonDataAsset)
 						if (Selection.activeObject == skeletonDataAsset)
@@ -583,7 +583,7 @@ namespace Spine.Unity.Editor {
 			FileInfo[] assetInfoArr = dir.GetFiles("*.asset");
 			FileInfo[] assetInfoArr = dir.GetFiles("*.asset");
 
 
 			int subLen = Application.dataPath.Length - 6;
 			int subLen = Application.dataPath.Length - 6;
-			foreach (var f in assetInfoArr) {
+			foreach (FileInfo f in assetInfoArr) {
 				string assetRelativePath = f.FullName.Substring(subLen, f.FullName.Length - subLen).Replace("\\", "/");
 				string assetRelativePath = f.FullName.Substring(subLen, f.FullName.Length - subLen).Replace("\\", "/");
 				Object obj = AssetDatabase.LoadAssetAtPath(assetRelativePath, typeof(AtlasAssetBase));
 				Object obj = AssetDatabase.LoadAssetAtPath(assetRelativePath, typeof(AtlasAssetBase));
 				if (obj != null)
 				if (obj != null)
@@ -621,11 +621,11 @@ namespace Spine.Unity.Editor {
 			List<string> pageFiles = new List<string>();
 			List<string> pageFiles = new List<string>();
 			Atlas atlas = atlasAsset.GetAtlas(onlyMetaData: true);
 			Atlas atlas = atlasAsset.GetAtlas(onlyMetaData: true);
 			if (atlas != null) {
 			if (atlas != null) {
-				foreach (var page in atlas.Pages)
+				foreach (AtlasPage page in atlas.Pages)
 					pageFiles.Add(page.name);
 					pageFiles.Add(page.name);
 			}
 			}
 
 
-			var populatingMaterials = new List<Material>(pageFiles.Count);
+			List<Material> populatingMaterials = new List<Material>(pageFiles.Count);
 
 
 			for (int i = 0; i < pageFiles.Count; i++) {
 			for (int i = 0; i < pageFiles.Count; i++) {
 				string texturePath = assetPath + "/" + pageFiles[i];
 				string texturePath = assetPath + "/" + pageFiles[i];
@@ -692,7 +692,7 @@ namespace Spine.Unity.Editor {
 			atlas = atlasAsset.GetAtlas(onlyMetaData: false);
 			atlas = atlasAsset.GetAtlas(onlyMetaData: false);
 			if (atlas != null) {
 			if (atlas != null) {
 				FieldInfo field = typeof(Atlas).GetField("regions", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.NonPublic);
 				FieldInfo field = typeof(Atlas).GetField("regions", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.NonPublic);
-				var regions = (List<AtlasRegion>)field.GetValue(atlas);
+				List<AtlasRegion> regions = (List<AtlasRegion>)field.GetValue(atlas);
 				string atlasAssetPath = AssetDatabase.GetAssetPath(atlasAsset);
 				string atlasAssetPath = AssetDatabase.GetAssetPath(atlasAsset);
 				string atlasAssetDirPath = Path.GetDirectoryName(atlasAssetPath).Replace('\\', '/');
 				string atlasAssetDirPath = Path.GetDirectoryName(atlasAssetPath).Replace('\\', '/');
 				string bakedDirPath = Path.Combine(atlasAssetDirPath, atlasAsset.name);
 				string bakedDirPath = Path.Combine(atlasAssetDirPath, atlasAsset.name);
@@ -717,7 +717,7 @@ namespace Spine.Unity.Editor {
 			protectFromStackGarbageCollection.Remove(atlasAsset);
 			protectFromStackGarbageCollection.Remove(atlasAsset);
 			// note: at Asset Pipeline V2 this LoadAssetAtPath of the just created
 			// note: at Asset Pipeline V2 this LoadAssetAtPath of the just created
 			// asset returns null, regardless of refresh calls.
 			// asset returns null, regardless of refresh calls.
-			var loadedAtlas = (AtlasAssetBase)AssetDatabase.LoadAssetAtPath(atlasPath, typeof(AtlasAssetBase));
+			AtlasAssetBase loadedAtlas = (AtlasAssetBase)AssetDatabase.LoadAssetAtPath(atlasPath, typeof(AtlasAssetBase));
 			return loadedAtlas != null ? loadedAtlas : atlasAsset;
 			return loadedAtlas != null ? loadedAtlas : atlasAsset;
 		}
 		}
 
 
@@ -831,7 +831,7 @@ namespace Spine.Unity.Editor {
 			atlasAsset.spriteAtlasFile = spriteAtlas;
 			atlasAsset.spriteAtlasFile = spriteAtlas;
 
 
 			int pagesCount = 1;
 			int pagesCount = 1;
-			var populatingMaterials = new List<Material>(pagesCount);
+			List<Material> populatingMaterials = new List<Material>(pagesCount);
 
 
 			{
 			{
 				string pageName = "SpriteAtlas";
 				string pageName = "SpriteAtlas";
@@ -900,7 +900,7 @@ namespace Spine.Unity.Editor {
 
 
 #if NEW_PREFERENCES_SETTINGS_PROVIDER
 #if NEW_PREFERENCES_SETTINGS_PROVIDER
 		static bool SetReferenceTextureSettings (string texturePath, SpineAtlasAsset atlasAsset, string referenceAssetPath) {
 		static bool SetReferenceTextureSettings (string texturePath, SpineAtlasAsset atlasAsset, string referenceAssetPath) {
-			var texturePreset = AssetDatabase.LoadAssetAtPath<UnityEditor.Presets.Preset>(referenceAssetPath);
+			UnityEditor.Presets.Preset texturePreset = AssetDatabase.LoadAssetAtPath<UnityEditor.Presets.Preset>(referenceAssetPath);
 			bool isTexturePreset = texturePreset != null && texturePreset.GetTargetTypeName() == "TextureImporter";
 			bool isTexturePreset = texturePreset != null && texturePreset.GetTargetTypeName() == "TextureImporter";
 			if (!isTexturePreset)
 			if (!isTexturePreset)
 				return SetDefaultTextureSettings(texturePath, atlasAsset);
 				return SetDefaultTextureSettings(texturePath, atlasAsset);
@@ -1026,7 +1026,7 @@ namespace Spine.Unity.Editor {
 					skeletonDataAsset.atlasAssets = atlasAssets;
 					skeletonDataAsset.atlasAssets = atlasAssets;
 					SpineEditorUtilities.ClearSkeletonDataAsset(skeletonDataAsset);
 					SpineEditorUtilities.ClearSkeletonDataAsset(skeletonDataAsset);
 				}
 				}
-				var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+				SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 				if (skeletonData != null)
 				if (skeletonData != null)
 					BlendModeMaterialsUtility.UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData);
 					BlendModeMaterialsUtility.UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData);
 				AssetDatabase.SaveAssets();
 				AssetDatabase.SaveAssets();
@@ -1047,10 +1047,10 @@ namespace Spine.Unity.Editor {
 			DirectoryInfo dirInfo = new DirectoryInfo(dir);
 			DirectoryInfo dirInfo = new DirectoryInfo(dir);
 			FileInfo[] files = dirInfo.GetFiles("*.asset");
 			FileInfo[] files = dirInfo.GetFiles("*.asset");
 
 
-			foreach (var path in files) {
+			foreach (FileInfo path in files) {
 				string localPath = dir + "/" + path.Name;
 				string localPath = dir + "/" + path.Name;
-				var obj = AssetDatabase.LoadAssetAtPath(localPath, typeof(Object));
-				var skeletonDataAsset = obj as SkeletonDataAsset;
+				UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(localPath, typeof(Object));
+				SkeletonDataAsset skeletonDataAsset = obj as SkeletonDataAsset;
 				if (skeletonDataAsset != null && skeletonDataAsset.skeletonJSON == textAsset)
 				if (skeletonDataAsset != null && skeletonDataAsset.skeletonJSON == textAsset)
 					return true;
 					return true;
 			}
 			}
@@ -1084,7 +1084,7 @@ namespace Spine.Unity.Editor {
 					if (selectedAtlas != null) {
 					if (selectedAtlas != null) {
 						localAtlases.Clear();
 						localAtlases.Clear();
 						localAtlases.Add(selectedAtlas);
 						localAtlases.Add(selectedAtlas);
-						var atlasMatch = AssetUtility.GetMatchingAtlas(requiredPaths, localAtlases);
+						AtlasAssetBase atlasMatch = AssetUtility.GetMatchingAtlas(requiredPaths, localAtlases);
 						if (atlasMatch != null) {
 						if (atlasMatch != null) {
 							resolved = true;
 							resolved = true;
 							AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasMatch);
 							AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasMatch);
@@ -1094,7 +1094,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 				case 0: { // Resolve AtlasAssets...
 				case 0: { // Resolve AtlasAssets...
 					string pathForwardSlash = Path.GetDirectoryName(skeletonPath).Replace('\\', '/');
 					string pathForwardSlash = Path.GetDirectoryName(skeletonPath).Replace('\\', '/');
-					var atlasList = MultiAtlasDialog(requiredPaths, pathForwardSlash,
+					List<AtlasAssetBase> atlasList = MultiAtlasDialog(requiredPaths, pathForwardSlash,
 						localAtlases, filename);
 						localAtlases, filename);
 					if (atlasList != null)
 					if (atlasList != null)
 						AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasList.ToArray());
 						AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasList.ToArray());
@@ -1124,8 +1124,8 @@ namespace Spine.Unity.Editor {
 			while (!resolved) {
 			while (!resolved) {
 
 
 				// Build dialog box message.
 				// Build dialog box message.
-				var missingRegions = new List<string>(requiredPaths);
-				var dialogText = new StringBuilder();
+				List<string> missingRegions = new List<string>(requiredPaths);
+				StringBuilder dialogText = new StringBuilder();
 				{
 				{
 					dialogText.AppendLine(string.Format("SkeletonDataAsset for \"{0}\"", filename));
 					dialogText.AppendLine(string.Format("SkeletonDataAsset for \"{0}\"", filename));
 					dialogText.AppendLine("has missing regions.");
 					dialogText.AppendLine("has missing regions.");
@@ -1141,8 +1141,8 @@ namespace Spine.Unity.Editor {
 					dialogText.AppendLine();
 					dialogText.AppendLine();
 					dialogText.AppendLine("Missing Regions:");
 					dialogText.AppendLine("Missing Regions:");
 
 
-					foreach (var atlasAsset in atlasAssets) {
-						var atlas = atlasAsset.GetAtlas();
+					foreach (AtlasAssetBase atlasAsset in atlasAssets) {
+						Atlas atlas = atlasAsset.GetAtlas();
 						for (int i = 0; i < missingRegions.Count; i++) {
 						for (int i = 0; i < missingRegions.Count; i++) {
 							if (atlas.FindRegionIgnoringNumberSuffix(missingRegions[i]) != null) {
 							if (atlas.FindRegionIgnoringNumberSuffix(missingRegions[i]) != null) {
 								missingRegions.RemoveAt(i);
 								missingRegions.RemoveAt(i);
@@ -1175,7 +1175,7 @@ namespace Spine.Unity.Editor {
 					AtlasAssetBase selectedAtlasAsset = BrowseAtlasDialog(lastAtlasPath, localAtlases);
 					AtlasAssetBase selectedAtlasAsset = BrowseAtlasDialog(lastAtlasPath, localAtlases);
 					if (selectedAtlasAsset != null) {
 					if (selectedAtlasAsset != null) {
 						if (!atlasAssets.Contains(selectedAtlasAsset)) {
 						if (!atlasAssets.Contains(selectedAtlasAsset)) {
-							var atlas = selectedAtlasAsset.GetAtlas();
+							Atlas atlas = selectedAtlasAsset.GetAtlas();
 							bool hasValidRegion = false;
 							bool hasValidRegion = false;
 							foreach (string str in missingRegions) {
 							foreach (string str in missingRegions) {
 								if (atlas.FindRegionIgnoringNumberSuffix(str) != null) {
 								if (atlas.FindRegionIgnoringNumberSuffix(str) != null) {
@@ -1250,7 +1250,7 @@ namespace Spine.Unity.Editor {
 			const string TintBlackShaderQuery = "Tint Black";
 			const string TintBlackShaderQuery = "Tint Black";
 
 
 			if (skeletonRenderer == null) return;
 			if (skeletonRenderer == null) return;
-			var skeletonDataAsset = skeletonRenderer.skeletonDataAsset;
+			SkeletonDataAsset skeletonDataAsset = skeletonRenderer.skeletonDataAsset;
 			if (skeletonDataAsset == null) return;
 			if (skeletonDataAsset == null) return;
 
 
 			bool pmaVertexColors = false;
 			bool pmaVertexColors = false;
@@ -1279,7 +1279,7 @@ namespace Spine.Unity.Editor {
 			skeletonRenderer.tintBlack = tintBlack;
 			skeletonRenderer.tintBlack = tintBlack;
 			skeletonRenderer.zSpacing = SpineEditorUtilities.Preferences.defaultZSpacing;
 			skeletonRenderer.zSpacing = SpineEditorUtilities.Preferences.defaultZSpacing;
 
 
-			var data = skeletonDataAsset.GetSkeletonData(false);
+			SkeletonData data = skeletonDataAsset.GetSkeletonData(false);
 			bool noSkins = data.DefaultSkin == null && (data.Skins == null || data.Skins.Count == 0); // Support attachmentless/skinless SkeletonData.
 			bool noSkins = data.DefaultSkin == null && (data.Skins == null || data.Skins.Count == 0); // Support attachmentless/skinless SkeletonData.
 			skin = skin ?? data.DefaultSkin ?? (noSkins ? null : data.Skins.Items[0]);
 			skin = skin ?? data.DefaultSkin ?? (noSkins ? null : data.Skins.Items[0]);
 			if (skin != null && skin != data.DefaultSkin) {
 			if (skin != null && skin != data.DefaultSkin) {
@@ -1290,8 +1290,8 @@ namespace Spine.Unity.Editor {
 		public static SkeletonAnimation InstantiateSkeletonAnimation (SkeletonDataAsset skeletonDataAsset, string skinName,
 		public static SkeletonAnimation InstantiateSkeletonAnimation (SkeletonDataAsset skeletonDataAsset, string skinName,
 			bool destroyInvalid = true, bool useObjectFactory = true) {
 			bool destroyInvalid = true, bool useObjectFactory = true) {
 
 
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
-			var skin = skeletonData != null ? skeletonData.FindSkin(skinName) : null;
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			Skin skin = skeletonData != null ? skeletonData.FindSkin(skinName) : null;
 			return InstantiateSkeletonAnimation(skeletonDataAsset, skin, destroyInvalid, useObjectFactory);
 			return InstantiateSkeletonAnimation(skeletonDataAsset, skin, destroyInvalid, useObjectFactory);
 		}
 		}
 
 
@@ -1358,10 +1358,10 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public static void InstantiateEmptySpineGameObject<T> (string name, bool useObjectFactory) where T : MonoBehaviour {
 		public static void InstantiateEmptySpineGameObject<T> (string name, bool useObjectFactory) where T : MonoBehaviour {
-			var parentGameObject = Selection.activeObject as GameObject;
-			var parentTransform = parentGameObject == null ? null : parentGameObject.transform;
+			GameObject parentGameObject = Selection.activeObject as GameObject;
+			Transform parentTransform = parentGameObject == null ? null : parentGameObject.transform;
 
 
-			var gameObject = EditorInstantiation.NewGameObject(name, useObjectFactory, typeof(T));
+			GameObject gameObject = EditorInstantiation.NewGameObject(name, useObjectFactory, typeof(T));
 			gameObject.transform.SetParent(parentTransform, false);
 			gameObject.transform.SetParent(parentTransform, false);
 			EditorUtility.FocusProjectWindow();
 			EditorUtility.FocusProjectWindow();
 			Selection.activeObject = gameObject;
 			Selection.activeObject = gameObject;

+ 20 - 20
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/BlendModeMaterialsUtility.cs

@@ -57,14 +57,14 @@ namespace Spine.Unity.Editor {
 		};
 		};
 
 
 		public static void UpgradeBlendModeMaterials (SkeletonDataAsset skeletonDataAsset) {
 		public static void UpgradeBlendModeMaterials (SkeletonDataAsset skeletonDataAsset) {
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			if (skeletonData == null)
 			if (skeletonData == null)
 				return;
 				return;
 			UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData, true);
 			UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData, true);
 		}
 		}
 
 
 		public static void UpdateBlendModeMaterials (SkeletonDataAsset skeletonDataAsset) {
 		public static void UpdateBlendModeMaterials (SkeletonDataAsset skeletonDataAsset) {
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			if (skeletonData == null)
 			if (skeletonData == null)
 				return;
 				return;
 			UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData, false);
 			UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData, false);
@@ -76,7 +76,7 @@ namespace Spine.Unity.Editor {
 			TemplateMaterials templateMaterials = new TemplateMaterials();
 			TemplateMaterials templateMaterials = new TemplateMaterials();
 			bool anyMaterialsChanged = ClearUndesiredMaterialEntries(skeletonDataAsset);
 			bool anyMaterialsChanged = ClearUndesiredMaterialEntries(skeletonDataAsset);
 
 
-			var blendModesModifierAsset = FindBlendModeMaterialsModifierAsset(skeletonDataAsset);
+			BlendModeMaterialsAsset blendModesModifierAsset = FindBlendModeMaterialsModifierAsset(skeletonDataAsset);
 			if (blendModesModifierAsset) {
 			if (blendModesModifierAsset) {
 				if (upgradeFromModifierAssets) {
 				if (upgradeFromModifierAssets) {
 					TransferSettingsFromModifierAsset(blendModesModifierAsset,
 					TransferSettingsFromModifierAsset(blendModesModifierAsset,
@@ -118,7 +118,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected static BlendModeMaterialsAsset FindBlendModeMaterialsModifierAsset (SkeletonDataAsset skeletonDataAsset) {
 		protected static BlendModeMaterialsAsset FindBlendModeMaterialsModifierAsset (SkeletonDataAsset skeletonDataAsset) {
-			foreach (var modifierAsset in skeletonDataAsset.skeletonDataModifiers) {
+			foreach (SkeletonDataModifierAsset modifierAsset in skeletonDataAsset.skeletonDataModifiers) {
 				if (modifierAsset is BlendModeMaterialsAsset)
 				if (modifierAsset is BlendModeMaterialsAsset)
 					return (BlendModeMaterialsAsset)modifierAsset;
 					return (BlendModeMaterialsAsset)modifierAsset;
 			}
 			}
@@ -159,18 +159,18 @@ namespace Spine.Unity.Editor {
 			TemplateMaterials templateMaterials, ref bool anyReplacementMaterialsChanged) {
 			TemplateMaterials templateMaterials, ref bool anyReplacementMaterialsChanged) {
 
 
 			bool anyCreationFailed = false;
 			bool anyCreationFailed = false;
-			var blendModeMaterials = skeletonDataAsset.blendModeMaterials;
+			BlendModeMaterials blendModeMaterials = skeletonDataAsset.blendModeMaterials;
 			bool applyAdditiveMaterial = blendModeMaterials.applyAdditiveMaterial;
 			bool applyAdditiveMaterial = blendModeMaterials.applyAdditiveMaterial;
 
 
-			var skinEntries = new List<Skin.SkinEntry>();
+			List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 
 
 			SpineEditorUtilities.ClearSkeletonDataAsset(skeletonDataAsset);
 			SpineEditorUtilities.ClearSkeletonDataAsset(skeletonDataAsset);
 			skeletonDataAsset.isUpgradingBlendModeMaterials = true;
 			skeletonDataAsset.isUpgradingBlendModeMaterials = true;
 			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 
 
-			var slotsItems = skeletonData.Slots.Items;
+			SlotData[] slotsItems = skeletonData.Slots.Items;
 			for (int slotIndex = 0, slotCount = skeletonData.Slots.Count; slotIndex < slotCount; slotIndex++) {
 			for (int slotIndex = 0, slotCount = skeletonData.Slots.Count; slotIndex < slotCount; slotIndex++) {
-				var slot = slotsItems[slotIndex];
+				SlotData slot = slotsItems[slotIndex];
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 
 
@@ -196,13 +196,13 @@ namespace Spine.Unity.Editor {
 				}
 				}
 
 
 				skinEntries.Clear();
 				skinEntries.Clear();
-				foreach (var skin in skeletonData.Skins)
+				foreach (Skin skin in skeletonData.Skins)
 					skin.GetAttachments(slotIndex, skinEntries);
 					skin.GetAttachments(slotIndex, skinEntries);
 
 
-				foreach (var entry in skinEntries) {
-					var renderableAttachment = entry.Attachment as IHasTextureRegion;
+				foreach (Skin.SkinEntry entry in skinEntries) {
+					IHasTextureRegion renderableAttachment = entry.Attachment as IHasTextureRegion;
 					if (renderableAttachment != null) {
 					if (renderableAttachment != null) {
-						var originalRegion = (AtlasRegion)renderableAttachment.Region;
+						AtlasRegion originalRegion = (AtlasRegion)renderableAttachment.Region;
 						if (originalRegion != null) {
 						if (originalRegion != null) {
 							anyCreationFailed |= CreateForRegion(
 							anyCreationFailed |= CreateForRegion(
 								ref replacementMaterials, ref anyReplacementMaterialsChanged,
 								ref replacementMaterials, ref anyReplacementMaterialsChanged,
@@ -236,7 +236,7 @@ namespace Spine.Unity.Editor {
 				replacement => replacement.pageName == originalRegion.page.name);
 				replacement => replacement.pageName == originalRegion.page.name);
 			if (!replacementExists) {
 			if (!replacementExists) {
 				bool createdNewMaterial;
 				bool createdNewMaterial;
-				var replacement = CreateOrLoadReplacementMaterial(originalRegion, materialTemplate, materialSuffix, out createdNewMaterial);
+				BlendModeMaterials.ReplacementMaterial replacement = CreateOrLoadReplacementMaterial(originalRegion, materialTemplate, materialSuffix, out createdNewMaterial);
 				if (replacement != null) {
 				if (replacement != null) {
 					replacementMaterials.Add(replacement);
 					replacementMaterials.Add(replacement);
 					anyReplacementMaterialsChanged = true;
 					anyReplacementMaterialsChanged = true;
@@ -256,8 +256,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		protected static string GetBlendModeMaterialPath (AtlasPage originalPage, string materialSuffix) {
 		protected static string GetBlendModeMaterialPath (AtlasPage originalPage, string materialSuffix) {
-			var originalMaterial = originalPage.rendererObject as Material;
-			var originalPath = AssetDatabase.GetAssetPath(originalMaterial);
+			Material originalMaterial = originalPage.rendererObject as Material;
+			string originalPath = AssetDatabase.GetAssetPath(originalMaterial);
 			return originalPath.Replace(".mat", materialSuffix + ".mat");
 			return originalPath.Replace(".mat", materialSuffix + ".mat");
 		}
 		}
 
 
@@ -265,16 +265,16 @@ namespace Spine.Unity.Editor {
 			AtlasRegion originalRegion, Material materialTemplate, string materialSuffix, out bool createdNewMaterial) {
 			AtlasRegion originalRegion, Material materialTemplate, string materialSuffix, out bool createdNewMaterial) {
 
 
 			createdNewMaterial = false;
 			createdNewMaterial = false;
-			var newReplacement = new BlendModeMaterials.ReplacementMaterial();
-			var originalPage = originalRegion.page;
-			var originalMaterial = originalPage.rendererObject as Material;
-			var blendMaterialPath = GetBlendModeMaterialPath(originalPage, materialSuffix);
+			BlendModeMaterials.ReplacementMaterial newReplacement = new BlendModeMaterials.ReplacementMaterial();
+			AtlasPage originalPage = originalRegion.page;
+			Material originalMaterial = originalPage.rendererObject as Material;
+			string blendMaterialPath = GetBlendModeMaterialPath(originalPage, materialSuffix);
 
 
 			newReplacement.pageName = originalPage.name;
 			newReplacement.pageName = originalPage.name;
 			if (File.Exists(blendMaterialPath)) {
 			if (File.Exists(blendMaterialPath)) {
 				newReplacement.material = AssetDatabase.LoadAssetAtPath<Material>(blendMaterialPath);
 				newReplacement.material = AssetDatabase.LoadAssetAtPath<Material>(blendMaterialPath);
 			} else {
 			} else {
-				var blendModeMaterial = new Material(materialTemplate) {
+				Material blendModeMaterial = new Material(materialTemplate) {
 					name = originalMaterial.name + " " + materialTemplate.name,
 					name = originalMaterial.name + " " + materialTemplate.name,
 					mainTexture = originalMaterial.mainTexture
 					mainTexture = originalMaterial.mainTexture
 				};
 				};

+ 17 - 17
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/DataReloadHandler.cs

@@ -66,11 +66,11 @@ namespace Spine.Unity.Editor {
 				if (EditorApplication.isCompiling) return;
 				if (EditorApplication.isCompiling) return;
 				if (EditorApplication.isPlayingOrWillChangePlaymode) return;
 				if (EditorApplication.isPlayingOrWillChangePlaymode) return;
 
 
-				var skeletonDataAssetsToReload = new HashSet<SkeletonDataAsset>();
+				HashSet<SkeletonDataAsset> skeletonDataAssetsToReload = new HashSet<SkeletonDataAsset>();
 
 
-				var activeSkeletonRenderers = GameObject.FindObjectsOfType<SkeletonRenderer>();
-				foreach (var sr in activeSkeletonRenderers) {
-					var skeletonDataAsset = sr.skeletonDataAsset;
+				SkeletonRenderer[] activeSkeletonRenderers = GameObject.FindObjectsOfType<SkeletonRenderer>();
+				foreach (SkeletonRenderer sr in activeSkeletonRenderers) {
+					SkeletonDataAsset skeletonDataAsset = sr.skeletonDataAsset;
 					if (skeletonDataAsset != null) skeletonDataAssetsToReload.Add(skeletonDataAsset);
 					if (skeletonDataAsset != null) skeletonDataAssetsToReload.Add(skeletonDataAsset);
 				}
 				}
 
 
@@ -79,24 +79,24 @@ namespace Spine.Unity.Editor {
 				// by the instance of the ScriptableObject being destroyed but still assigned.
 				// by the instance of the ScriptableObject being destroyed but still assigned.
 				// Here we save the skeletonGraphic.skeletonDataAsset asset path in order
 				// Here we save the skeletonGraphic.skeletonDataAsset asset path in order
 				// to restore it later.
 				// to restore it later.
-				var activeSkeletonGraphics = GameObject.FindObjectsOfType<SkeletonGraphic>();
-				foreach (var skeletonGraphic in activeSkeletonGraphics) {
-					var skeletonDataAsset = skeletonGraphic.skeletonDataAsset;
+				SkeletonGraphic[] activeSkeletonGraphics = GameObject.FindObjectsOfType<SkeletonGraphic>();
+				foreach (SkeletonGraphic skeletonGraphic in activeSkeletonGraphics) {
+					SkeletonDataAsset skeletonDataAsset = skeletonGraphic.skeletonDataAsset;
 					if (skeletonDataAsset != null) {
 					if (skeletonDataAsset != null) {
-						var assetPath = AssetDatabase.GetAssetPath(skeletonDataAsset);
-						var sgID = skeletonGraphic.GetInstanceID();
+						string assetPath = AssetDatabase.GetAssetPath(skeletonDataAsset);
+						int sgID = skeletonGraphic.GetInstanceID();
 						savedSkeletonDataAssetAtSKeletonGraphicID[sgID] = assetPath;
 						savedSkeletonDataAssetAtSKeletonGraphicID[sgID] = assetPath;
 						skeletonDataAssetsToReload.Add(skeletonDataAsset);
 						skeletonDataAssetsToReload.Add(skeletonDataAsset);
 					}
 					}
 				}
 				}
 
 
-				foreach (var skeletonDataAsset in skeletonDataAssetsToReload) {
+				foreach (SkeletonDataAsset skeletonDataAsset in skeletonDataAssetsToReload) {
 					ReloadSkeletonDataAsset(skeletonDataAsset, false);
 					ReloadSkeletonDataAsset(skeletonDataAsset, false);
 				}
 				}
 
 
-				foreach (var skeletonRenderer in activeSkeletonRenderers)
+				foreach (SkeletonRenderer skeletonRenderer in activeSkeletonRenderers)
 					skeletonRenderer.Initialize(true);
 					skeletonRenderer.Initialize(true);
-				foreach (var skeletonGraphic in activeSkeletonGraphics)
+				foreach (SkeletonGraphic skeletonGraphic in activeSkeletonGraphics)
 					skeletonGraphic.Initialize(true);
 					skeletonGraphic.Initialize(true);
 			}
 			}
 
 
@@ -106,13 +106,13 @@ namespace Spine.Unity.Editor {
 				if (EditorApplication.isCompiling) return;
 				if (EditorApplication.isCompiling) return;
 				if (EditorApplication.isPlayingOrWillChangePlaymode) return;
 				if (EditorApplication.isPlayingOrWillChangePlaymode) return;
 
 
-				var activeSkeletonRenderers = GameObject.FindObjectsOfType<SkeletonRenderer>();
-				foreach (var renderer in activeSkeletonRenderers) {
+				SkeletonRenderer[] activeSkeletonRenderers = GameObject.FindObjectsOfType<SkeletonRenderer>();
+				foreach (SkeletonRenderer renderer in activeSkeletonRenderers) {
 					if (renderer.isActiveAndEnabled && renderer.skeletonDataAsset == skeletonDataAsset) renderer.Initialize(true);
 					if (renderer.isActiveAndEnabled && renderer.skeletonDataAsset == skeletonDataAsset) renderer.Initialize(true);
 				}
 				}
 
 
-				var activeSkeletonGraphics = GameObject.FindObjectsOfType<SkeletonGraphic>();
-				foreach (var graphic in activeSkeletonGraphics) {
+				SkeletonGraphic[] activeSkeletonGraphics = GameObject.FindObjectsOfType<SkeletonGraphic>();
+				foreach (SkeletonGraphic graphic in activeSkeletonGraphics) {
 					if (graphic.isActiveAndEnabled && graphic.skeletonDataAsset == skeletonDataAsset)
 					if (graphic.isActiveAndEnabled && graphic.skeletonDataAsset == skeletonDataAsset)
 						graphic.Initialize(true);
 						graphic.Initialize(true);
 				}
 				}
@@ -133,7 +133,7 @@ namespace Spine.Unity.Editor {
 				foreach (string guid in guids) {
 				foreach (string guid in guids) {
 					string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid);
 					string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid);
 					if (!string.IsNullOrEmpty(path)) {
 					if (!string.IsNullOrEmpty(path)) {
-						var referenceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(path);
+						AnimationReferenceAsset referenceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(path);
 						if (referenceAsset.SkeletonDataAsset == skeletonDataAsset)
 						if (referenceAsset.SkeletonDataAsset == skeletonDataAsset)
 							func(referenceAsset);
 							func(referenceAsset);
 					}
 					}

+ 11 - 11
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Instantiation.cs

@@ -55,16 +55,16 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			public static void SceneViewDragAndDrop (SceneView sceneview) {
 			public static void SceneViewDragAndDrop (SceneView sceneview) {
-				var current = UnityEngine.Event.current;
-				var references = DragAndDrop.objectReferences;
+				UnityEngine.Event current = UnityEngine.Event.current;
+				UnityEngine.Object[] references = DragAndDrop.objectReferences;
 				if (current.type == EventType.Layout)
 				if (current.type == EventType.Layout)
 					return;
 					return;
 
 
 				// Allow drag and drop of one SkeletonDataAsset.
 				// Allow drag and drop of one SkeletonDataAsset.
 				if (references.Length == 1) {
 				if (references.Length == 1) {
-					var skeletonDataAsset = references[0] as SkeletonDataAsset;
+					SkeletonDataAsset skeletonDataAsset = references[0] as SkeletonDataAsset;
 					if (skeletonDataAsset != null) {
 					if (skeletonDataAsset != null) {
-						var mousePos = current.mousePosition;
+						Vector2 mousePos = current.mousePosition;
 
 
 						bool invalidSkeletonData = skeletonDataAsset.GetSkeletonData(true) == null;
 						bool invalidSkeletonData = skeletonDataAsset.GetSkeletonData(true) == null;
 						if (invalidSkeletonData) {
 						if (invalidSkeletonData) {
@@ -94,7 +94,7 @@ namespace Spine.Unity.Editor {
 
 
 			public static void ShowInstantiateContextMenu (SkeletonDataAsset skeletonDataAsset, Vector3 spawnPoint,
 			public static void ShowInstantiateContextMenu (SkeletonDataAsset skeletonDataAsset, Vector3 spawnPoint,
 				Transform parent, int siblingIndex = 0) {
 				Transform parent, int siblingIndex = 0) {
-				var menu = new GenericMenu();
+				GenericMenu menu = new GenericMenu();
 
 
 				// SkeletonAnimation
 				// SkeletonAnimation
 				menu.AddItem(new GUIContent("SkeletonAnimation"), false, HandleSkeletonComponentDrop, new SpawnMenuData {
 				menu.AddItem(new GUIContent("SkeletonAnimation"), false, HandleSkeletonComponentDrop, new SpawnMenuData {
@@ -107,9 +107,9 @@ namespace Spine.Unity.Editor {
 				});
 				});
 
 
 				// SkeletonGraphic
 				// SkeletonGraphic
-				var skeletonGraphicInspectorType = System.Type.GetType("Spine.Unity.Editor.SkeletonGraphicInspector");
+				System.Type skeletonGraphicInspectorType = System.Type.GetType("Spine.Unity.Editor.SkeletonGraphicInspector");
 				if (skeletonGraphicInspectorType != null) {
 				if (skeletonGraphicInspectorType != null) {
-					var graphicInstantiateDelegate = skeletonGraphicInspectorType.GetMethod("SpawnSkeletonGraphicFromDrop", BindingFlags.Static | BindingFlags.Public);
+					MethodInfo graphicInstantiateDelegate = skeletonGraphicInspectorType.GetMethod("SpawnSkeletonGraphicFromDrop", BindingFlags.Static | BindingFlags.Public);
 					if (graphicInstantiateDelegate != null)
 					if (graphicInstantiateDelegate != null)
 						menu.AddItem(new GUIContent("SkeletonGraphic (UI)"), false, HandleSkeletonComponentDrop, new SpawnMenuData {
 						menu.AddItem(new GUIContent("SkeletonGraphic (UI)"), false, HandleSkeletonComponentDrop, new SpawnMenuData {
 							skeletonDataAsset = skeletonDataAsset,
 							skeletonDataAsset = skeletonDataAsset,
@@ -138,7 +138,7 @@ namespace Spine.Unity.Editor {
 			}
 			}
 
 
 			public static void HandleSkeletonComponentDrop (object spawnMenuData) {
 			public static void HandleSkeletonComponentDrop (object spawnMenuData) {
-				var data = (SpawnMenuData)spawnMenuData;
+				SpawnMenuData data = (SpawnMenuData)spawnMenuData;
 
 
 				if (data.skeletonDataAsset.GetSkeletonData(true) == null) {
 				if (data.skeletonDataAsset.GetSkeletonData(true) == null) {
 					EditorUtility.DisplayDialog("Invalid SkeletonDataAsset", "Unable to create Spine GameObject.\n\nPlease check your SkeletonDataAsset.", "Ok");
 					EditorUtility.DisplayDialog("Invalid SkeletonDataAsset", "Unable to create Spine GameObject.\n\nPlease check your SkeletonDataAsset.", "Ok");
@@ -151,7 +151,7 @@ namespace Spine.Unity.Editor {
 				GameObject newGameObject = newSkeletonComponent.gameObject;
 				GameObject newGameObject = newSkeletonComponent.gameObject;
 				Transform newTransform = newGameObject.transform;
 				Transform newTransform = newGameObject.transform;
 
 
-				var usedParent = data.parent != null ? data.parent.gameObject : isUI ? Selection.activeGameObject : null;
+				GameObject usedParent = data.parent != null ? data.parent.gameObject : isUI ? Selection.activeGameObject : null;
 				if (usedParent)
 				if (usedParent)
 					newTransform.SetParent(usedParent.transform, false);
 					newTransform.SetParent(usedParent.transform, false);
 				if (data.siblingIndex != 0)
 				if (data.siblingIndex != 0)
@@ -193,8 +193,8 @@ namespace Spine.Unity.Editor {
 			/// Converts a mouse point to a world point on a plane.
 			/// Converts a mouse point to a world point on a plane.
 			/// </summary>
 			/// </summary>
 			static Vector3 MousePointToWorldPoint2D (Vector2 mousePosition, Camera camera, Plane plane) {
 			static Vector3 MousePointToWorldPoint2D (Vector2 mousePosition, Camera camera, Plane plane) {
-				var screenPos = new Vector3(mousePosition.x, camera.pixelHeight - mousePosition.y, 0f);
-				var ray = camera.ScreenPointToRay(screenPos);
+				Vector3 screenPos = new Vector3(mousePosition.x, camera.pixelHeight - mousePosition.y, 0f);
+				Ray ray = camera.ScreenPointToRay(screenPos);
 				float distance;
 				float distance;
 				bool hit = plane.Raycast(ray, out distance);
 				bool hit = plane.Raycast(ray, out distance);
 				return ray.GetPoint(distance);
 				return ray.GetPoint(distance);

+ 13 - 13
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Preferences.cs

@@ -59,11 +59,11 @@ namespace Spine.Unity.Editor {
 		static class SpineSettingsProviderRegistration {
 		static class SpineSettingsProviderRegistration {
 			[SettingsProvider]
 			[SettingsProvider]
 			public static SettingsProvider CreateSpineSettingsProvider () {
 			public static SettingsProvider CreateSpineSettingsProvider () {
-				var provider = new SettingsProvider("Spine", SettingsScope.User) {
+				SettingsProvider provider = new SettingsProvider("Spine", SettingsScope.User) {
 					label = "Spine",
 					label = "Spine",
 					guiHandler = (searchContext) => {
 					guiHandler = (searchContext) => {
-						var settings = SpinePreferences.GetOrCreateSettings();
-						var serializedSettings = new SerializedObject(settings);
+						SpinePreferences settings = SpinePreferences.GetOrCreateSettings();
+						SerializedObject serializedSettings = new SerializedObject(settings);
 						SpinePreferences.HandlePreferencesGUI(serializedSettings);
 						SpinePreferences.HandlePreferencesGUI(serializedSettings);
 						if (serializedSettings.ApplyModifiedProperties())
 						if (serializedSettings.ApplyModifiedProperties())
 							OldPreferences.SaveToEditorPrefs(settings);
 							OldPreferences.SaveToEditorPrefs(settings);
@@ -274,7 +274,7 @@ namespace Spine.Unity.Editor {
 					SpineEditorUtilities.FloatPrefsField(ref defaultScale, DEFAULT_SCALE_KEY, new GUIContent("Default SkeletonData Scale", "The Default skeleton import scale for newly imported SkeletonDataAssets."), min: 0.0000001f);
 					SpineEditorUtilities.FloatPrefsField(ref defaultScale, DEFAULT_SCALE_KEY, new GUIContent("Default SkeletonData Scale", "The Default skeleton import scale for newly imported SkeletonDataAssets."), min: 0.0000001f);
 
 
 					EditorGUI.BeginChangeCheck();
 					EditorGUI.BeginChangeCheck();
-					var shader = (EditorGUILayout.ObjectField("Default Shader", Shader.Find(defaultShader), typeof(Shader), false) as Shader);
+					Shader shader = (EditorGUILayout.ObjectField("Default Shader", Shader.Find(defaultShader), typeof(Shader), false) as Shader);
 					defaultShader = shader != null ? shader.name : SpinePreferences.DEFAULT_DEFAULT_SHADER;
 					defaultShader = shader != null ? shader.name : SpinePreferences.DEFAULT_DEFAULT_SHADER;
 					if (EditorGUI.EndChangeCheck())
 					if (EditorGUI.EndChangeCheck())
 						EditorPrefs.SetString(DEFAULT_SHADER_KEY, defaultShader);
 						EditorPrefs.SetString(DEFAULT_SHADER_KEY, defaultShader);
@@ -282,7 +282,7 @@ namespace Spine.Unity.Editor {
 					SpineEditorUtilities.BoolPrefsField(ref setTextureImporterSettings, SET_TEXTUREIMPORTER_SETTINGS_KEY, new GUIContent("Apply Atlas Texture Settings", "Apply the recommended settings for Texture Importers."));
 					SpineEditorUtilities.BoolPrefsField(ref setTextureImporterSettings, SET_TEXTUREIMPORTER_SETTINGS_KEY, new GUIContent("Apply Atlas Texture Settings", "Apply the recommended settings for Texture Importers."));
 					SpineEditorUtilities.Texture2DPrefsField(ref textureSettingsReference, TEXTURE_SETTINGS_REFERENCE_KEY, new GUIContent("Atlas Texture Reference Settings", "Apply the selected reference texture import settings at newly imported atlas textures. When exporting atlas textures from Spine with \"Premultiply alpha\" enabled (the default), you can leave it at \"PMAPresetTemplate\". If you have disabled \"Premultiply alpha\", set it to \"StraightAlphaPresetTemplate\". You can also create your own reference texture asset and assign it here."));
 					SpineEditorUtilities.Texture2DPrefsField(ref textureSettingsReference, TEXTURE_SETTINGS_REFERENCE_KEY, new GUIContent("Atlas Texture Reference Settings", "Apply the selected reference texture import settings at newly imported atlas textures. When exporting atlas textures from Spine with \"Premultiply alpha\" enabled (the default), you can leave it at \"PMAPresetTemplate\". If you have disabled \"Premultiply alpha\", set it to \"StraightAlphaPresetTemplate\". You can also create your own reference texture asset and assign it here."));
 					if (string.IsNullOrEmpty(textureSettingsReference)) {
 					if (string.IsNullOrEmpty(textureSettingsReference)) {
-						var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMAPresetTemplate");
+						string[] pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMAPresetTemplate");
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
 							textureSettingsReference = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
 							textureSettingsReference = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
 							EditorPrefs.SetString(TEXTURE_SETTINGS_REFERENCE_KEY, textureSettingsReference);
 							EditorPrefs.SetString(TEXTURE_SETTINGS_REFERENCE_KEY, textureSettingsReference);
@@ -291,21 +291,21 @@ namespace Spine.Unity.Editor {
 
 
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialAdditive, BLEND_MODE_MATERIAL_ADDITIVE_KEY, new GUIContent("Additive Material", "Additive blend mode Material template."));
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialAdditive, BLEND_MODE_MATERIAL_ADDITIVE_KEY, new GUIContent("Additive Material", "Additive blend mode Material template."));
 					if (string.IsNullOrEmpty(blendModeMaterialAdditive)) {
 					if (string.IsNullOrEmpty(blendModeMaterialAdditive)) {
-						var blendModeMaterialAdditiveGUIDS = AssetDatabase.FindAssets(DEFAULT_BLEND_MODE_ADDITIVE_MATERIAL);
+						string[] blendModeMaterialAdditiveGUIDS = AssetDatabase.FindAssets(DEFAULT_BLEND_MODE_ADDITIVE_MATERIAL);
 						if (blendModeMaterialAdditiveGUIDS.Length > 0) {
 						if (blendModeMaterialAdditiveGUIDS.Length > 0) {
 							blendModeMaterialAdditive = AssetDatabase.GUIDToAssetPath(blendModeMaterialAdditiveGUIDS[0]);
 							blendModeMaterialAdditive = AssetDatabase.GUIDToAssetPath(blendModeMaterialAdditiveGUIDS[0]);
 						}
 						}
 					}
 					}
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialMultiply, BLEND_MODE_MATERIAL_MULTIPLY_KEY, new GUIContent("Multiply Material", "Multiply blend mode Material template."));
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialMultiply, BLEND_MODE_MATERIAL_MULTIPLY_KEY, new GUIContent("Multiply Material", "Multiply blend mode Material template."));
 					if (string.IsNullOrEmpty(blendModeMaterialMultiply)) {
 					if (string.IsNullOrEmpty(blendModeMaterialMultiply)) {
-						var blendModeMaterialMultiplyGUIDS = AssetDatabase.FindAssets(DEFAULT_BLEND_MODE_MULTIPLY_MATERIAL);
+						string[] blendModeMaterialMultiplyGUIDS = AssetDatabase.FindAssets(DEFAULT_BLEND_MODE_MULTIPLY_MATERIAL);
 						if (blendModeMaterialMultiplyGUIDS.Length > 0) {
 						if (blendModeMaterialMultiplyGUIDS.Length > 0) {
 							blendModeMaterialMultiply = AssetDatabase.GUIDToAssetPath(blendModeMaterialMultiplyGUIDS[0]);
 							blendModeMaterialMultiply = AssetDatabase.GUIDToAssetPath(blendModeMaterialMultiplyGUIDS[0]);
 						}
 						}
 					}
 					}
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialScreen, BLEND_MODE_MATERIAL_SCREEN_KEY, new GUIContent("Screen Material", "Screen blend mode Material template."));
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialScreen, BLEND_MODE_MATERIAL_SCREEN_KEY, new GUIContent("Screen Material", "Screen blend mode Material template."));
 					if (string.IsNullOrEmpty(blendModeMaterialScreen)) {
 					if (string.IsNullOrEmpty(blendModeMaterialScreen)) {
-						var blendModeMaterialScreenGUIDS = AssetDatabase.FindAssets(DEFAULT_BLEND_MODE_SCREEN_MATERIAL);
+						string[] blendModeMaterialScreenGUIDS = AssetDatabase.FindAssets(DEFAULT_BLEND_MODE_SCREEN_MATERIAL);
 						if (blendModeMaterialScreenGUIDS.Length > 0) {
 						if (blendModeMaterialScreenGUIDS.Length > 0) {
 							blendModeMaterialScreen = AssetDatabase.GUIDToAssetPath(blendModeMaterialScreenGUIDS[0]);
 							blendModeMaterialScreen = AssetDatabase.GUIDToAssetPath(blendModeMaterialScreenGUIDS[0]);
 						}
 						}
@@ -403,7 +403,7 @@ namespace Spine.Unity.Editor {
 		static void Texture2DPrefsField (ref string currentValue, string editorPrefsKey, GUIContent label) {
 		static void Texture2DPrefsField (ref string currentValue, string editorPrefsKey, GUIContent label) {
 			EditorGUI.BeginChangeCheck();
 			EditorGUI.BeginChangeCheck();
 			EditorGUIUtility.wideMode = true;
 			EditorGUIUtility.wideMode = true;
-			var texture = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<Texture2D>(currentValue), typeof(Object), false) as Texture2D);
+			Texture2D texture = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<Texture2D>(currentValue), typeof(Object), false) as Texture2D);
 			currentValue = texture != null ? AssetDatabase.GetAssetPath(texture) : "";
 			currentValue = texture != null ? AssetDatabase.GetAssetPath(texture) : "";
 			if (EditorGUI.EndChangeCheck()) {
 			if (EditorGUI.EndChangeCheck()) {
 				EditorPrefs.SetString(editorPrefsKey, currentValue);
 				EditorPrefs.SetString(editorPrefsKey, currentValue);
@@ -413,7 +413,7 @@ namespace Spine.Unity.Editor {
 		static void MaterialPrefsField (ref string currentValue, string editorPrefsKey, GUIContent label) {
 		static void MaterialPrefsField (ref string currentValue, string editorPrefsKey, GUIContent label) {
 			EditorGUI.BeginChangeCheck();
 			EditorGUI.BeginChangeCheck();
 			EditorGUIUtility.wideMode = true;
 			EditorGUIUtility.wideMode = true;
-			var material = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<Material>(currentValue), typeof(Object), false) as Material);
+			Material material = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<Material>(currentValue), typeof(Object), false) as Material);
 			currentValue = material != null ? AssetDatabase.GetAssetPath(material) : "";
 			currentValue = material != null ? AssetDatabase.GetAssetPath(material) : "";
 			if (EditorGUI.EndChangeCheck()) {
 			if (EditorGUI.EndChangeCheck()) {
 				EditorPrefs.SetString(editorPrefsKey, currentValue);
 				EditorPrefs.SetString(editorPrefsKey, currentValue);
@@ -429,18 +429,18 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public static void ShaderPropertyField (SerializedProperty property, GUIContent label, string fallbackShaderName) {
 		public static void ShaderPropertyField (SerializedProperty property, GUIContent label, string fallbackShaderName) {
-			var shader = (EditorGUILayout.ObjectField(label, Shader.Find(property.stringValue), typeof(Shader), false) as Shader);
+			Shader shader = (EditorGUILayout.ObjectField(label, Shader.Find(property.stringValue), typeof(Shader), false) as Shader);
 			property.stringValue = shader != null ? shader.name : fallbackShaderName;
 			property.stringValue = shader != null ? shader.name : fallbackShaderName;
 		}
 		}
 
 
 		public static void MaterialPropertyField (SerializedProperty property, GUIContent label) {
 		public static void MaterialPropertyField (SerializedProperty property, GUIContent label) {
-			var material = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<Material>(property.stringValue), typeof(Material), false) as Material);
+			Material material = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<Material>(property.stringValue), typeof(Material), false) as Material);
 			property.stringValue = material ? AssetDatabase.GetAssetPath(material) : "";
 			property.stringValue = material ? AssetDatabase.GetAssetPath(material) : "";
 		}
 		}
 
 
 #if NEW_PREFERENCES_SETTINGS_PROVIDER
 #if NEW_PREFERENCES_SETTINGS_PROVIDER
 		public static void PresetAssetPropertyField (SerializedProperty property, GUIContent label) {
 		public static void PresetAssetPropertyField (SerializedProperty property, GUIContent label) {
-			var texturePreset = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<UnityEditor.Presets.Preset>(property.stringValue), typeof(UnityEditor.Presets.Preset), false) as UnityEditor.Presets.Preset);
+			UnityEditor.Presets.Preset texturePreset = (EditorGUILayout.ObjectField(label, AssetDatabase.LoadAssetAtPath<UnityEditor.Presets.Preset>(property.stringValue), typeof(UnityEditor.Presets.Preset), false) as UnityEditor.Presets.Preset);
 			bool isTexturePreset = texturePreset != null && texturePreset.GetTargetTypeName() == "TextureImporter";
 			bool isTexturePreset = texturePreset != null && texturePreset.GetTargetTypeName() == "TextureImporter";
 			property.stringValue = isTexturePreset ? AssetDatabase.GetAssetPath(texturePreset) : "";
 			property.stringValue = isTexturePreset ? AssetDatabase.GetAssetPath(texturePreset) : "";
 		}
 		}

+ 5 - 5
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineBuildProcessor.cs

@@ -88,8 +88,8 @@ namespace Spine.Unity.Editor {
 			try {
 			try {
 				AssetDatabase.StartAssetEditing();
 				AssetDatabase.StartAssetEditing();
 				prefabsToRestore.Clear();
 				prefabsToRestore.Clear();
-				var prefabAssets = AssetDatabase.FindAssets("t:Prefab");
-				foreach (var asset in prefabAssets) {
+				string[] prefabAssets = AssetDatabase.FindAssets("t:Prefab");
+				foreach (string asset in prefabAssets) {
 					string assetPath = AssetDatabase.GUIDToAssetPath(asset);
 					string assetPath = AssetDatabase.GUIDToAssetPath(asset);
 					GameObject prefabGameObject = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
 					GameObject prefabGameObject = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
 					if (SpineEditorUtilities.CleanupSpinePrefabMesh(prefabGameObject)) {
 					if (SpineEditorUtilities.CleanupSpinePrefabMesh(prefabGameObject)) {
@@ -136,8 +136,8 @@ namespace Spine.Unity.Editor {
 			try {
 			try {
 				AssetDatabase.StartAssetEditing();
 				AssetDatabase.StartAssetEditing();
 				spriteAtlasTexturesToRestore.Clear();
 				spriteAtlasTexturesToRestore.Clear();
-				var spriteAtlasAssets = AssetDatabase.FindAssets("t:SpineSpriteAtlasAsset");
-				foreach (var asset in spriteAtlasAssets) {
+				string[] spriteAtlasAssets = AssetDatabase.FindAssets("t:SpineSpriteAtlasAsset");
+				foreach (string asset in spriteAtlasAssets) {
 					string assetPath = AssetDatabase.GUIDToAssetPath(asset);
 					string assetPath = AssetDatabase.GUIDToAssetPath(asset);
 					SpineSpriteAtlasAsset atlasAsset = AssetDatabase.LoadAssetAtPath<SpineSpriteAtlasAsset>(assetPath);
 					SpineSpriteAtlasAsset atlasAsset = AssetDatabase.LoadAssetAtPath<SpineSpriteAtlasAsset>(assetPath);
 					if (atlasAsset && atlasAsset.materials.Length > 0) {
 					if (atlasAsset && atlasAsset.materials.Length > 0) {
@@ -162,7 +162,7 @@ namespace Spine.Unity.Editor {
 		internal static void PostprocessSpriteAtlases () {
 		internal static void PostprocessSpriteAtlases () {
 			BuildUtilities.IsInSpriteAtlasBuildPostProcessing = true;
 			BuildUtilities.IsInSpriteAtlasBuildPostProcessing = true;
 			try {
 			try {
-				foreach (var pair in spriteAtlasTexturesToRestore) {
+				foreach (KeyValuePair<string, string> pair in spriteAtlasTexturesToRestore) {
 					string assetPath = pair.Key;
 					string assetPath = pair.Key;
 					SpineSpriteAtlasAsset atlasAsset = AssetDatabase.LoadAssetAtPath<SpineSpriteAtlasAsset>(assetPath);
 					SpineSpriteAtlasAsset atlasAsset = AssetDatabase.LoadAssetAtPath<SpineSpriteAtlasAsset>(assetPath);
 					if (atlasAsset && atlasAsset.materials.Length > 0) {
 					if (atlasAsset && atlasAsset.materials.Length > 0) {

+ 15 - 15
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs

@@ -94,7 +94,7 @@ namespace Spine.Unity.Editor {
 
 
 			// we copy the list here to prevent nested calls to OnPostprocessAllAssets() triggering a Clear() of the list
 			// we copy the list here to prevent nested calls to OnPostprocessAllAssets() triggering a Clear() of the list
 			// in the middle of execution.
 			// in the middle of execution.
-			var texturesWithoutMetaFileCopy = new List<string>(texturesWithoutMetaFile);
+			List<string> texturesWithoutMetaFileCopy = new List<string>(texturesWithoutMetaFile);
 			AssetUtility.HandleOnPostprocessAllAssets(imported, texturesWithoutMetaFileCopy);
 			AssetUtility.HandleOnPostprocessAllAssets(imported, texturesWithoutMetaFileCopy);
 			texturesWithoutMetaFile.Clear();
 			texturesWithoutMetaFile.Clear();
 		}
 		}
@@ -111,17 +111,17 @@ namespace Spine.Unity.Editor {
 		public static bool SetupSpinePrefabMesh (GameObject g, UnityEditor.AssetImporters.AssetImportContext context) {
 		public static bool SetupSpinePrefabMesh (GameObject g, UnityEditor.AssetImporters.AssetImportContext context) {
 			Dictionary<string, int> nameUsageCount = new Dictionary<string, int>();
 			Dictionary<string, int> nameUsageCount = new Dictionary<string, int>();
 			bool wasModified = false;
 			bool wasModified = false;
-			var skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
+			SkeletonRenderer[] skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
 			foreach (SkeletonRenderer renderer in skeletonRenderers) {
 			foreach (SkeletonRenderer renderer in skeletonRenderers) {
 				wasModified = true;
 				wasModified = true;
-				var meshFilter = renderer.GetComponent<MeshFilter>();
+				MeshFilter meshFilter = renderer.GetComponent<MeshFilter>();
 				if (meshFilter == null)
 				if (meshFilter == null)
 					meshFilter = renderer.gameObject.AddComponent<MeshFilter>();
 					meshFilter = renderer.gameObject.AddComponent<MeshFilter>();
 
 
 				renderer.EditorUpdateMeshFilterHideFlags();
 				renderer.EditorUpdateMeshFilterHideFlags();
 				renderer.Initialize(true, true);
 				renderer.Initialize(true, true);
 				renderer.LateUpdateMesh();
 				renderer.LateUpdateMesh();
-				var mesh = meshFilter.sharedMesh;
+				Mesh mesh = meshFilter.sharedMesh;
 				if (mesh == null) continue;
 				if (mesh == null) continue;
 
 
 				string meshName = string.Format("Skeleton Prefab Mesh \"{0}\"", renderer.name);
 				string meshName = string.Format("Skeleton Prefab Mesh \"{0}\"", renderer.name);
@@ -141,9 +141,9 @@ namespace Spine.Unity.Editor {
 
 
 		public static bool CleanupSpinePrefabMesh (GameObject g) {
 		public static bool CleanupSpinePrefabMesh (GameObject g) {
 			bool wasModified = false;
 			bool wasModified = false;
-			var skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
+			SkeletonRenderer[] skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
 			foreach (SkeletonRenderer renderer in skeletonRenderers) {
 			foreach (SkeletonRenderer renderer in skeletonRenderers) {
-				var meshFilter = renderer.GetComponent<MeshFilter>();
+				MeshFilter meshFilter = renderer.GetComponent<MeshFilter>();
 				if (meshFilter != null) {
 				if (meshFilter != null) {
 					if (meshFilter.sharedMesh) {
 					if (meshFilter.sharedMesh) {
 						wasModified = true;
 						wasModified = true;
@@ -294,7 +294,7 @@ namespace Spine.Unity.Editor {
 			if (component == null) return;
 			if (component == null) return;
 			if (!SkeletonDataAssetIsValid(component.SkeletonDataAsset)) return;
 			if (!SkeletonDataAssetIsValid(component.SkeletonDataAsset)) return;
 
 
-			var stateComponent = component as IAnimationStateComponent;
+			IAnimationStateComponent stateComponent = component as IAnimationStateComponent;
 			AnimationState oldAnimationState = null;
 			AnimationState oldAnimationState = null;
 			if (stateComponent != null) {
 			if (stateComponent != null) {
 				oldAnimationState = stateComponent.AnimationState;
 				oldAnimationState = stateComponent.AnimationState;
@@ -474,20 +474,20 @@ namespace Spine.Unity.Editor {
 			internal static void HandleDragAndDrop (int instanceId, Rect selectionRect) {
 			internal static void HandleDragAndDrop (int instanceId, Rect selectionRect) {
 				// HACK: Uses EditorApplication.hierarchyWindowItemOnGUI.
 				// HACK: Uses EditorApplication.hierarchyWindowItemOnGUI.
 				// Only works when there is at least one item in the scene.
 				// Only works when there is at least one item in the scene.
-				var current = UnityEngine.Event.current;
-				var eventType = current.type;
+				UnityEngine.Event current = UnityEngine.Event.current;
+				EventType eventType = current.type;
 				bool isDraggingEvent = eventType == EventType.DragUpdated;
 				bool isDraggingEvent = eventType == EventType.DragUpdated;
 				bool isDropEvent = eventType == EventType.DragPerform;
 				bool isDropEvent = eventType == EventType.DragPerform;
 				UnityEditor.DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
 				UnityEditor.DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
 
 
 				if (isDraggingEvent || isDropEvent) {
 				if (isDraggingEvent || isDropEvent) {
-					var mouseOverWindow = EditorWindow.mouseOverWindow;
+					EditorWindow mouseOverWindow = EditorWindow.mouseOverWindow;
 					if (mouseOverWindow != null) {
 					if (mouseOverWindow != null) {
 
 
 						// One, existing, valid SkeletonDataAsset
 						// One, existing, valid SkeletonDataAsset
-						var references = UnityEditor.DragAndDrop.objectReferences;
+						Object[] references = UnityEditor.DragAndDrop.objectReferences;
 						if (references.Length == 1) {
 						if (references.Length == 1) {
-							var skeletonDataAsset = references[0] as SkeletonDataAsset;
+							SkeletonDataAsset skeletonDataAsset = references[0] as SkeletonDataAsset;
 							if (skeletonDataAsset != null && skeletonDataAsset.GetSkeletonData(true) != null) {
 							if (skeletonDataAsset != null && skeletonDataAsset.GetSkeletonData(true) != null) {
 
 
 								// Allow drag-and-dropping anywhere in the Hierarchy Window.
 								// Allow drag-and-dropping anywhere in the Hierarchy Window.
@@ -496,12 +496,12 @@ namespace Spine.Unity.Editor {
 								const string GenericDataTargetID = "target";
 								const string GenericDataTargetID = "target";
 								if (HierarchyWindow.Equals(mouseOverWindow.GetType().ToString(), System.StringComparison.Ordinal)) {
 								if (HierarchyWindow.Equals(mouseOverWindow.GetType().ToString(), System.StringComparison.Ordinal)) {
 									if (isDraggingEvent) {
 									if (isDraggingEvent) {
-										var mouseOverTarget = UnityEditor.EditorUtility.InstanceIDToObject(instanceId);
+										UnityEngine.Object mouseOverTarget = UnityEditor.EditorUtility.InstanceIDToObject(instanceId);
 										if (mouseOverTarget)
 										if (mouseOverTarget)
 											DragAndDrop.SetGenericData(GenericDataTargetID, mouseOverTarget);
 											DragAndDrop.SetGenericData(GenericDataTargetID, mouseOverTarget);
 										// Note: do not call current.Use(), otherwise we get the wrong drop-target parent.
 										// Note: do not call current.Use(), otherwise we get the wrong drop-target parent.
 									} else if (isDropEvent) {
 									} else if (isDropEvent) {
-										var parentGameObject = DragAndDrop.GetGenericData(GenericDataTargetID) as UnityEngine.GameObject;
+										GameObject parentGameObject = DragAndDrop.GetGenericData(GenericDataTargetID) as UnityEngine.GameObject;
 										Transform parent = parentGameObject != null ? parentGameObject.transform : null;
 										Transform parent = parentGameObject != null ? parentGameObject.transform : null;
 										// when dragging into empty space in hierarchy below last node, last node would be parent.
 										// when dragging into empty space in hierarchy below last node, last node would be parent.
 										if (IsLastNodeInHierarchy(parent))
 										if (IsLastNodeInHierarchy(parent))
@@ -528,7 +528,7 @@ namespace Spine.Unity.Editor {
 					node = node.parent;
 					node = node.parent;
 				}
 				}
 
 
-				var rootNodes = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects();
+				GameObject[] rootNodes = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects();
 				bool isLastNode = (rootNodes.Length > 0 && rootNodes[rootNodes.Length - 1].transform == node);
 				bool isLastNode = (rootNodes.Length > 0 && rootNodes[rootNodes.Length - 1].transform == node);
 				return isLastNode;
 				return isLastNode;
 			}
 			}

+ 24 - 24
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineHandles.cs

@@ -165,7 +165,7 @@ namespace Spine.Unity.Editor {
 			GUIStyle style = BoneNameStyle;
 			GUIStyle style = BoneNameStyle;
 			foreach (Bone b in skeleton.Bones) {
 			foreach (Bone b in skeleton.Bones) {
 				if (!b.Active) continue;
 				if (!b.Active) continue;
-				var pos = new Vector3(b.WorldX * positionScale, b.WorldY * positionScale, 0) + (new Vector3(b.A, b.C) * (b.Data.Length * 0.5f));
+				Vector3 pos = new Vector3(b.WorldX * positionScale, b.WorldY * positionScale, 0) + (new Vector3(b.A, b.C) * (b.Data.Length * 0.5f));
 				pos = transform.TransformPoint(pos);
 				pos = transform.TransformPoint(pos);
 				Handles.Label(pos, b.Data.Name, style);
 				Handles.Label(pos, b.Data.Name, style);
 			}
 			}
@@ -192,7 +192,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 		public static void DrawBoneWireframe (Transform transform, Bone b, Color color, float skeletonRenderScale = 1f) {
 		public static void DrawBoneWireframe (Transform transform, Bone b, Color color, float skeletonRenderScale = 1f) {
 			Handles.color = color;
 			Handles.color = color;
-			var pos = new Vector3(b.WorldX * skeletonRenderScale, b.WorldY * skeletonRenderScale, 0);
+			Vector3 pos = new Vector3(b.WorldX * skeletonRenderScale, b.WorldY * skeletonRenderScale, 0);
 			float length = b.Data.Length;
 			float length = b.Data.Length;
 
 
 			if (length > 0) {
 			if (length > 0) {
@@ -202,16 +202,16 @@ namespace Spine.Unity.Editor {
 				scale.y *= (SpineEditorUtilities.Preferences.handleScale + 1) * 0.5f;
 				scale.y *= (SpineEditorUtilities.Preferences.handleScale + 1) * 0.5f;
 				scale.y = Mathf.Clamp(scale.x, -my * skeletonRenderScale, my * skeletonRenderScale);
 				scale.y = Mathf.Clamp(scale.x, -my * skeletonRenderScale, my * skeletonRenderScale);
 				Handles.DrawPolyLine(GetBoneWireBuffer(transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale)));
 				Handles.DrawPolyLine(GetBoneWireBuffer(transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale)));
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, color, transform.forward, skeletonRenderScale);
 				DrawBoneCircle(wp, color, transform.forward, skeletonRenderScale);
 			} else {
 			} else {
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, color, transform.forward, skeletonRenderScale);
 				DrawBoneCircle(wp, color, transform.forward, skeletonRenderScale);
 			}
 			}
 		}
 		}
 
 
 		public static void DrawBone (Transform transform, Bone b, float boneScale, float skeletonRenderScale = 1f) {
 		public static void DrawBone (Transform transform, Bone b, float boneScale, float skeletonRenderScale = 1f) {
-			var pos = new Vector3(b.WorldX * skeletonRenderScale, b.WorldY * skeletonRenderScale, 0);
+			Vector3 pos = new Vector3(b.WorldX * skeletonRenderScale, b.WorldY * skeletonRenderScale, 0);
 			float length = b.Data.Length;
 			float length = b.Data.Length;
 			if (length > 0) {
 			if (length > 0) {
 				Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotationX);
 				Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotationX);
@@ -222,13 +222,13 @@ namespace Spine.Unity.Editor {
 				SpineHandles.GetBoneMaterial().SetPass(0);
 				SpineHandles.GetBoneMaterial().SetPass(0);
 				Graphics.DrawMeshNow(SpineHandles.BoneMesh, transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale));
 				Graphics.DrawMeshNow(SpineHandles.BoneMesh, transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale));
 			} else {
 			} else {
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, SpineHandles.BoneColor, transform.forward, boneScale * skeletonRenderScale);
 				DrawBoneCircle(wp, SpineHandles.BoneColor, transform.forward, boneScale * skeletonRenderScale);
 			}
 			}
 		}
 		}
 
 
 		public static void DrawBone (Transform transform, Bone b, float boneScale, Color color, float skeletonRenderScale = 1f) {
 		public static void DrawBone (Transform transform, Bone b, float boneScale, Color color, float skeletonRenderScale = 1f) {
-			var pos = new Vector3(b.WorldX * skeletonRenderScale, b.WorldY * skeletonRenderScale, 0);
+			Vector3 pos = new Vector3(b.WorldX * skeletonRenderScale, b.WorldY * skeletonRenderScale, 0);
 			float length = b.Data.Length;
 			float length = b.Data.Length;
 			if (length > 0) {
 			if (length > 0) {
 				Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotationX);
 				Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotationX);
@@ -239,14 +239,14 @@ namespace Spine.Unity.Editor {
 				SpineHandles.GetBoneMaterial(color).SetPass(0);
 				SpineHandles.GetBoneMaterial(color).SetPass(0);
 				Graphics.DrawMeshNow(SpineHandles.BoneMesh, transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale));
 				Graphics.DrawMeshNow(SpineHandles.BoneMesh, transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale));
 			} else {
 			} else {
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, color, transform.forward, boneScale * skeletonRenderScale);
 				DrawBoneCircle(wp, color, transform.forward, boneScale * skeletonRenderScale);
 			}
 			}
 		}
 		}
 
 
 		public static void DrawPaths (Transform transform, Skeleton skeleton) {
 		public static void DrawPaths (Transform transform, Skeleton skeleton) {
 			foreach (Slot s in skeleton.DrawOrder) {
 			foreach (Slot s in skeleton.DrawOrder) {
-				var p = s.Attachment as PathAttachment;
+				PathAttachment p = s.Attachment as PathAttachment;
 				if (p != null) SpineHandles.DrawPath(s, p, transform, true);
 				if (p != null) SpineHandles.DrawPath(s, p, transform, true);
 			}
 			}
 		}
 		}
@@ -261,7 +261,7 @@ namespace Spine.Unity.Editor {
 			float[] pv = pathVertexBuffer;
 			float[] pv = pathVertexBuffer;
 			p.ComputeWorldVertices(s, pv);
 			p.ComputeWorldVertices(s, pv);
 
 
-			var ocolor = Handles.color;
+			Color ocolor = Handles.color;
 			Handles.color = SpineHandles.PathColor;
 			Handles.color = SpineHandles.PathColor;
 
 
 			Matrix4x4 m = t.localToWorldMatrix;
 			Matrix4x4 m = t.localToWorldMatrix;
@@ -300,8 +300,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public static void DrawBoundingBoxes (Transform transform, Skeleton skeleton) {
 		public static void DrawBoundingBoxes (Transform transform, Skeleton skeleton) {
-			foreach (var slot in skeleton.Slots) {
-				var bba = slot.Attachment as BoundingBoxAttachment;
+			foreach (Slot slot in skeleton.Slots) {
+				BoundingBoxAttachment bba = slot.Attachment as BoundingBoxAttachment;
 				if (bba != null) SpineHandles.DrawBoundingBox(slot, bba, transform);
 				if (bba != null) SpineHandles.DrawBoundingBox(slot, bba, transform);
 			}
 			}
 		}
 		}
@@ -309,7 +309,7 @@ namespace Spine.Unity.Editor {
 		public static void DrawBoundingBox (Slot slot, BoundingBoxAttachment box, Transform t) {
 		public static void DrawBoundingBox (Slot slot, BoundingBoxAttachment box, Transform t) {
 			if (box.Vertices.Length <= 2) return; // Handle cases where user creates a BoundingBoxAttachment but doesn't actually define it.
 			if (box.Vertices.Length <= 2) return; // Handle cases where user creates a BoundingBoxAttachment but doesn't actually define it.
 
 
-			var worldVerts = new float[box.WorldVerticesLength];
+			float[] worldVerts = new float[box.WorldVerticesLength];
 			box.ComputeWorldVertices(slot, worldVerts);
 			box.ComputeWorldVertices(slot, worldVerts);
 
 
 			Handles.color = Color.green;
 			Handles.color = Color.green;
@@ -355,15 +355,15 @@ namespace Spine.Unity.Editor {
 
 
 			// Transform Constraints
 			// Transform Constraints
 			handleColor = SpineHandles.TransformContraintColor;
 			handleColor = SpineHandles.TransformContraintColor;
-			foreach (var tc in skeleton.TransformConstraints) {
-				var targetBone = tc.Target;
+			foreach (TransformConstraint tc in skeleton.TransformConstraints) {
+				Bone targetBone = tc.Target;
 				targetPos = targetBone.GetWorldPosition(transform, skeletonRenderScale);
 				targetPos = targetBone.GetWorldPosition(transform, skeletonRenderScale);
 
 
 				if (tc.MixX > 0 || tc.MixY > 0) {
 				if (tc.MixX > 0 || tc.MixY > 0) {
 					if ((tc.MixX > 0 && tc.MixX != 1f) ||
 					if ((tc.MixX > 0 && tc.MixX != 1f) ||
 						(tc.MixY > 0 && tc.MixY != 1f)) {
 						(tc.MixY > 0 && tc.MixY != 1f)) {
 						Handles.color = handleColor;
 						Handles.color = handleColor;
-						foreach (var b in tc.Bones) {
+						foreach (Bone b in tc.Bones) {
 							pos = b.GetWorldPosition(transform, skeletonRenderScale);
 							pos = b.GetWorldPosition(transform, skeletonRenderScale);
 							Handles.DrawDottedLine(targetPos, pos, Thickness);
 							Handles.DrawDottedLine(targetPos, pos, Thickness);
 						}
 						}
@@ -376,10 +376,10 @@ namespace Spine.Unity.Editor {
 
 
 			// IK Constraints
 			// IK Constraints
 			handleColor = SpineHandles.IkColor;
 			handleColor = SpineHandles.IkColor;
-			foreach (var ikc in skeleton.IkConstraints) {
+			foreach (IkConstraint ikc in skeleton.IkConstraints) {
 				Bone targetBone = ikc.Target;
 				Bone targetBone = ikc.Target;
 				targetPos = targetBone.GetWorldPosition(transform, skeletonRenderScale);
 				targetPos = targetBone.GetWorldPosition(transform, skeletonRenderScale);
-				var bones = ikc.Bones;
+				ExposedList<Bone> bones = ikc.Bones;
 				active = ikc.Mix > 0;
 				active = ikc.Mix > 0;
 				if (active) {
 				if (active) {
 					pos = bones.Items[0].GetWorldPosition(transform, skeletonRenderScale);
 					pos = bones.Items[0].GetWorldPosition(transform, skeletonRenderScale);
@@ -388,7 +388,7 @@ namespace Spine.Unity.Editor {
 						Handles.color = handleColor;
 						Handles.color = handleColor;
 						Handles.DrawLine(targetPos, pos);
 						Handles.DrawLine(targetPos, pos);
 						SpineHandles.DrawBoneCircle(targetPos, handleColor, normal);
 						SpineHandles.DrawBoneCircle(targetPos, handleColor, normal);
-						var m = bones.Items[0].GetMatrix4x4();
+						Matrix4x4 m = bones.Items[0].GetMatrix4x4();
 						m.m03 = targetBone.WorldX * skeletonRenderScale;
 						m.m03 = targetBone.WorldX * skeletonRenderScale;
 						m.m13 = targetBone.WorldY * skeletonRenderScale;
 						m.m13 = targetBone.WorldY * skeletonRenderScale;
 						SpineHandles.DrawArrowhead(transform.localToWorldMatrix * m);
 						SpineHandles.DrawArrowhead(transform.localToWorldMatrix * m);
@@ -403,7 +403,7 @@ namespace Spine.Unity.Editor {
 						SpineHandles.DrawBoneCircle(pos, handleColor, normal, 0.5f);
 						SpineHandles.DrawBoneCircle(pos, handleColor, normal, 0.5f);
 						SpineHandles.DrawBoneCircle(child, handleColor, normal, 0.5f);
 						SpineHandles.DrawBoneCircle(child, handleColor, normal, 0.5f);
 						SpineHandles.DrawBoneCircle(targetPos, handleColor, normal);
 						SpineHandles.DrawBoneCircle(targetPos, handleColor, normal);
-						var m = childBone.GetMatrix4x4();
+						Matrix4x4 m = childBone.GetMatrix4x4();
 						m.m03 = targetBone.WorldX * skeletonRenderScale;
 						m.m03 = targetBone.WorldX * skeletonRenderScale;
 						m.m13 = targetBone.WorldY * skeletonRenderScale;
 						m.m13 = targetBone.WorldY * skeletonRenderScale;
 						SpineHandles.DrawArrowhead(transform.localToWorldMatrix * m);
 						SpineHandles.DrawArrowhead(transform.localToWorldMatrix * m);
@@ -416,10 +416,10 @@ namespace Spine.Unity.Editor {
 
 
 			// Path Constraints
 			// Path Constraints
 			handleColor = SpineHandles.PathColor;
 			handleColor = SpineHandles.PathColor;
-			foreach (var pc in skeleton.PathConstraints) {
+			foreach (PathConstraint pc in skeleton.PathConstraints) {
 				active = pc.MixX > 0 || pc.MixY > 0 || pc.MixRotate > 0;
 				active = pc.MixX > 0 || pc.MixY > 0 || pc.MixRotate > 0;
 				if (active)
 				if (active)
-					foreach (var b in pc.Bones)
+					foreach (Bone b in pc.Bones)
 						SpineHandles.DrawBoneCircle(b.GetWorldPosition(transform, skeletonRenderScale), handleColor, normal, 1f * skeletonRenderScale);
 						SpineHandles.DrawBoneCircle(b.GetWorldPosition(transform, skeletonRenderScale), handleColor, normal, 1f * skeletonRenderScale);
 			}
 			}
 		}
 		}
@@ -433,8 +433,8 @@ namespace Spine.Unity.Editor {
 		static void DrawCrosshairs (Vector3 position, float scale, float a, float b, float c, float d, Transform transform, float skeletonRenderScale = 1f) {
 		static void DrawCrosshairs (Vector3 position, float scale, float a, float b, float c, float d, Transform transform, float skeletonRenderScale = 1f) {
 			scale *= SpineEditorUtilities.Preferences.handleScale * skeletonRenderScale;
 			scale *= SpineEditorUtilities.Preferences.handleScale * skeletonRenderScale;
 
 
-			var xOffset = (Vector3)(new Vector2(a, c).normalized * scale);
-			var yOffset = (Vector3)(new Vector2(b, d).normalized * scale);
+			Vector3 xOffset = (Vector3)(new Vector2(a, c).normalized * scale);
+			Vector3 yOffset = (Vector3)(new Vector2(b, d).normalized * scale);
 			xOffset = transform.TransformDirection(xOffset);
 			xOffset = transform.TransformDirection(xOffset);
 			yOffset = transform.TransformDirection(yOffset);
 			yOffset = transform.TransformDirection(yOffset);
 
 

+ 9 - 9
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs

@@ -282,9 +282,9 @@ namespace Spine.Unity.Editor {
 		public static bool TargetsUseSameData (SerializedObject so) {
 		public static bool TargetsUseSameData (SerializedObject so) {
 			if (so.isEditingMultipleObjects) {
 			if (so.isEditingMultipleObjects) {
 				int n = so.targetObjects.Length;
 				int n = so.targetObjects.Length;
-				var first = so.targetObjects[0] as IHasSkeletonDataAsset;
+				IHasSkeletonDataAsset first = so.targetObjects[0] as IHasSkeletonDataAsset;
 				for (int i = 1; i < n; i++) {
 				for (int i = 1; i < n; i++) {
-					var sr = so.targetObjects[i] as IHasSkeletonDataAsset;
+					IHasSkeletonDataAsset sr = so.targetObjects[i] as IHasSkeletonDataAsset;
 					if (sr != null && sr.SkeletonDataAsset != first.SkeletonDataAsset)
 					if (sr != null && sr.SkeletonDataAsset != first.SkeletonDataAsset)
 						return false;
 						return false;
 				}
 				}
@@ -294,20 +294,20 @@ namespace Spine.Unity.Editor {
 
 
 		public static SerializedObject GetRenderersSerializedObject (SerializedObject serializedObject) {
 		public static SerializedObject GetRenderersSerializedObject (SerializedObject serializedObject) {
 			if (serializedObject.isEditingMultipleObjects) {
 			if (serializedObject.isEditingMultipleObjects) {
-				var renderers = new List<Object>();
-				foreach (var o in serializedObject.targetObjects) {
-					var component = o as Component;
+				List<Object> renderers = new List<Object>();
+				foreach (UnityEngine.Object o in serializedObject.targetObjects) {
+					Component component = o as Component;
 					if (component != null) {
 					if (component != null) {
-						var renderer = component.GetComponent<Renderer>();
+						Renderer renderer = component.GetComponent<Renderer>();
 						if (renderer != null)
 						if (renderer != null)
 							renderers.Add(renderer);
 							renderers.Add(renderer);
 					}
 					}
 				}
 				}
 				return new SerializedObject(renderers.ToArray());
 				return new SerializedObject(renderers.ToArray());
 			} else {
 			} else {
-				var component = serializedObject.targetObject as Component;
+				Component component = serializedObject.targetObject as Component;
 				if (component != null) {
 				if (component != null) {
-					var renderer = component.GetComponent<Renderer>();
+					Renderer renderer = component.GetComponent<Renderer>();
 					if (renderer != null)
 					if (renderer != null)
 						return new SerializedObject(renderer);
 						return new SerializedObject(renderer);
 				}
 				}
@@ -350,7 +350,7 @@ namespace Spine.Unity.Editor {
 
 
 				// SetDirty
 				// SetDirty
 				if (renderer.isEditingMultipleObjects)
 				if (renderer.isEditingMultipleObjects)
-					foreach (var o in renderer.targetObjects)
+					foreach (UnityEngine.Object o in renderer.targetObjects)
 						EditorUtility.SetDirty(o);
 						EditorUtility.SetDirty(o);
 				else
 				else
 					EditorUtility.SetDirty(renderer.targetObject);
 					EditorUtility.SetDirty(renderer.targetObject);

+ 35 - 45
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineMaskUtilities.cs

@@ -49,82 +49,75 @@
 
 
 #if BUILT_IN_SPRITE_MASK_COMPONENT
 #if BUILT_IN_SPRITE_MASK_COMPONENT
 
 
-using UnityEngine;
-using UnityEditor;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.IO;
 using System.IO;
-using System.Text;
 using System.Linq;
 using System.Linq;
 using System.Reflection;
 using System.Reflection;
+using System.Text;
+using UnityEditor;
+using UnityEngine;
 
 
 namespace Spine.Unity.Editor {
 namespace Spine.Unity.Editor {
 
 
-	public class SpineMaskUtilities	{
+	public class SpineMaskUtilities {
 
 
 		private const string MATERIAL_FILENAME_SUFFIX_INSIDE_MASK = "_InsideMask";
 		private const string MATERIAL_FILENAME_SUFFIX_INSIDE_MASK = "_InsideMask";
 		private const string MATERIAL_FILENAME_SUFFIX_OUTSIDE_MASK = "_OutsideMask";
 		private const string MATERIAL_FILENAME_SUFFIX_OUTSIDE_MASK = "_OutsideMask";
 
 
-		public static void EditorAssignSpriteMaskMaterials(SkeletonRenderer skeleton) {
-			var maskMaterials = skeleton.maskMaterials;
-			var maskInteraction = skeleton.maskInteraction;
-			var meshRenderer = skeleton.GetComponent<MeshRenderer>();
+		public static void EditorAssignSpriteMaskMaterials (SkeletonRenderer skeleton) {
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
+			SpriteMaskInteraction maskInteraction = skeleton.maskInteraction;
+			MeshRenderer meshRenderer = skeleton.GetComponent<MeshRenderer>();
 
 
 			if (maskMaterials.materialsMaskDisabled.Length > 0 && maskMaterials.materialsMaskDisabled[0] != null &&
 			if (maskMaterials.materialsMaskDisabled.Length > 0 && maskMaterials.materialsMaskDisabled[0] != null &&
 				maskInteraction == SpriteMaskInteraction.None) {
 				maskInteraction == SpriteMaskInteraction.None) {
 				meshRenderer.materials = maskMaterials.materialsMaskDisabled;
 				meshRenderer.materials = maskMaterials.materialsMaskDisabled;
-			}
-			else if (maskInteraction == SpriteMaskInteraction.VisibleInsideMask) {
+			} else if (maskInteraction == SpriteMaskInteraction.VisibleInsideMask) {
 				if (maskMaterials.materialsInsideMask.Length == 0 || maskMaterials.materialsInsideMask[0] == null)
 				if (maskMaterials.materialsInsideMask.Length == 0 || maskMaterials.materialsInsideMask[0] == null)
 					EditorInitSpriteMaskMaterialsInsideMask(skeleton);
 					EditorInitSpriteMaskMaterialsInsideMask(skeleton);
 				meshRenderer.materials = maskMaterials.materialsInsideMask;
 				meshRenderer.materials = maskMaterials.materialsInsideMask;
-			}
-			else if (maskInteraction == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskInteraction == SpriteMaskInteraction.VisibleOutsideMask) {
 				if (maskMaterials.materialsOutsideMask.Length == 0 || maskMaterials.materialsOutsideMask[0] == null)
 				if (maskMaterials.materialsOutsideMask.Length == 0 || maskMaterials.materialsOutsideMask[0] == null)
 					EditorInitSpriteMaskMaterialsOutsideMask(skeleton);
 					EditorInitSpriteMaskMaterialsOutsideMask(skeleton);
 				meshRenderer.materials = maskMaterials.materialsOutsideMask;
 				meshRenderer.materials = maskMaterials.materialsOutsideMask;
 			}
 			}
 		}
 		}
 
 
-		public static bool AreMaskMaterialsMissing(SkeletonRenderer skeleton) {
-			var maskMaterials = skeleton.maskMaterials;
-			var maskInteraction = skeleton.maskInteraction;
+		public static bool AreMaskMaterialsMissing (SkeletonRenderer skeleton) {
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
+			SpriteMaskInteraction maskInteraction = skeleton.maskInteraction;
 
 
 			if (maskInteraction == SpriteMaskInteraction.VisibleInsideMask) {
 			if (maskInteraction == SpriteMaskInteraction.VisibleInsideMask) {
 				return (maskMaterials.materialsInsideMask.Length == 0 || maskMaterials.materialsInsideMask[0] == null);
 				return (maskMaterials.materialsInsideMask.Length == 0 || maskMaterials.materialsInsideMask[0] == null);
-			}
-			else if (maskInteraction == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskInteraction == SpriteMaskInteraction.VisibleOutsideMask) {
 				return (maskMaterials.materialsOutsideMask.Length == 0 || maskMaterials.materialsOutsideMask[0] == null);
 				return (maskMaterials.materialsOutsideMask.Length == 0 || maskMaterials.materialsOutsideMask[0] == null);
 			}
 			}
 			return false;
 			return false;
 		}
 		}
 
 
-		public static void EditorInitMaskMaterials(SkeletonRenderer skeleton, SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials, SpriteMaskInteraction maskType) {
+		public static void EditorInitMaskMaterials (SkeletonRenderer skeleton, SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials, SpriteMaskInteraction maskType) {
 			if (maskType == SpriteMaskInteraction.None) {
 			if (maskType == SpriteMaskInteraction.None) {
 				EditorConfirmDisabledMaskMaterialsInit(skeleton);
 				EditorConfirmDisabledMaskMaterialsInit(skeleton);
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 				EditorInitSpriteMaskMaterialsInsideMask(skeleton);
 				EditorInitSpriteMaskMaterialsInsideMask(skeleton);
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
 				EditorInitSpriteMaskMaterialsOutsideMask(skeleton);
 				EditorInitSpriteMaskMaterialsOutsideMask(skeleton);
 			}
 			}
 		}
 		}
 
 
-		public static void EditorDeleteMaskMaterials(SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials, SpriteMaskInteraction maskType) {
+		public static void EditorDeleteMaskMaterials (SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials, SpriteMaskInteraction maskType) {
 			Material[] targetMaterials;
 			Material[] targetMaterials;
 			if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 			if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 				targetMaterials = maskMaterials.materialsInsideMask;
 				targetMaterials = maskMaterials.materialsInsideMask;
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
 				targetMaterials = maskMaterials.materialsOutsideMask;
 				targetMaterials = maskMaterials.materialsOutsideMask;
-			}
-			else {
+			} else {
 				Debug.LogWarning("EditorDeleteMaskMaterials: Normal materials are kept as a reference and shall never be deleted.");
 				Debug.LogWarning("EditorDeleteMaskMaterials: Normal materials are kept as a reference and shall never be deleted.");
 				return;
 				return;
 			}
 			}
 
 
 			for (int i = 0; i < targetMaterials.Length; ++i) {
 			for (int i = 0; i < targetMaterials.Length; ++i) {
-				var material = targetMaterials[i];
+				Material material = targetMaterials[i];
 				if (material != null) {
 				if (material != null) {
 					string materialPath = UnityEditor.AssetDatabase.GetAssetPath(material);
 					string materialPath = UnityEditor.AssetDatabase.GetAssetPath(material);
 					UnityEditor.AssetDatabase.DeleteAsset(materialPath);
 					UnityEditor.AssetDatabase.DeleteAsset(materialPath);
@@ -134,31 +127,30 @@ namespace Spine.Unity.Editor {
 
 
 			if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 			if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 				maskMaterials.materialsInsideMask = new Material[0];
 				maskMaterials.materialsInsideMask = new Material[0];
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
 				maskMaterials.materialsOutsideMask = new Material[0];
 				maskMaterials.materialsOutsideMask = new Material[0];
 			}
 			}
 		}
 		}
 
 
-		private static void EditorInitSpriteMaskMaterialsInsideMask(SkeletonRenderer skeleton) {
-			var maskMaterials = skeleton.maskMaterials;
+		private static void EditorInitSpriteMaskMaterialsInsideMask (SkeletonRenderer skeleton) {
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
 			EditorInitSpriteMaskMaterialsForMaskType(skeleton, SkeletonRenderer.STENCIL_COMP_MASKINTERACTION_VISIBLE_INSIDE,
 			EditorInitSpriteMaskMaterialsForMaskType(skeleton, SkeletonRenderer.STENCIL_COMP_MASKINTERACTION_VISIBLE_INSIDE,
 													ref maskMaterials.materialsInsideMask);
 													ref maskMaterials.materialsInsideMask);
 		}
 		}
 
 
-		private static void EditorInitSpriteMaskMaterialsOutsideMask(SkeletonRenderer skeleton) {
-			var maskMaterials = skeleton.maskMaterials;
+		private static void EditorInitSpriteMaskMaterialsOutsideMask (SkeletonRenderer skeleton) {
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
 			EditorInitSpriteMaskMaterialsForMaskType(skeleton, SkeletonRenderer.STENCIL_COMP_MASKINTERACTION_VISIBLE_OUTSIDE,
 			EditorInitSpriteMaskMaterialsForMaskType(skeleton, SkeletonRenderer.STENCIL_COMP_MASKINTERACTION_VISIBLE_OUTSIDE,
 													ref maskMaterials.materialsOutsideMask);
 													ref maskMaterials.materialsOutsideMask);
 		}
 		}
 
 
-		private static void EditorInitSpriteMaskMaterialsForMaskType(SkeletonRenderer skeleton, UnityEngine.Rendering.CompareFunction maskFunction,
+		private static void EditorInitSpriteMaskMaterialsForMaskType (SkeletonRenderer skeleton, UnityEngine.Rendering.CompareFunction maskFunction,
 																ref Material[] materialsToFill) {
 																ref Material[] materialsToFill) {
 			if (!EditorConfirmDisabledMaskMaterialsInit(skeleton))
 			if (!EditorConfirmDisabledMaskMaterialsInit(skeleton))
 				return;
 				return;
 
 
-			var maskMaterials = skeleton.maskMaterials;
-			var originalMaterials = maskMaterials.materialsMaskDisabled;
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
+			Material[] originalMaterials = maskMaterials.materialsMaskDisabled;
 			materialsToFill = new Material[originalMaterials.Length];
 			materialsToFill = new Material[originalMaterials.Length];
 			for (int i = 0; i < originalMaterials.Length; i++) {
 			for (int i = 0; i < originalMaterials.Length; i++) {
 				Material newMaterial = null;
 				Material newMaterial = null;
@@ -174,13 +166,13 @@ namespace Spine.Unity.Editor {
 			}
 			}
 		}
 		}
 
 
-		private static bool EditorConfirmDisabledMaskMaterialsInit(SkeletonRenderer skeleton) {
-			var maskMaterials = skeleton.maskMaterials;
+		private static bool EditorConfirmDisabledMaskMaterialsInit (SkeletonRenderer skeleton) {
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
 			if (maskMaterials.materialsMaskDisabled.Length > 0 && maskMaterials.materialsMaskDisabled[0] != null) {
 			if (maskMaterials.materialsMaskDisabled.Length > 0 && maskMaterials.materialsMaskDisabled[0] != null) {
 				return true;
 				return true;
 			}
 			}
 
 
-			var meshRenderer = skeleton.GetComponent<MeshRenderer>();
+			MeshRenderer meshRenderer = skeleton.GetComponent<MeshRenderer>();
 			Material[] currentMaterials = meshRenderer.sharedMaterials;
 			Material[] currentMaterials = meshRenderer.sharedMaterials;
 
 
 			if (currentMaterials.Length == 0 || currentMaterials[0] == null) {
 			if (currentMaterials.Length == 0 || currentMaterials[0] == null) {
@@ -200,8 +192,7 @@ namespace Spine.Unity.Editor {
 					string correctPath = null;
 					string correctPath = null;
 					if (path.Contains(MATERIAL_FILENAME_SUFFIX_INSIDE_MASK)) {
 					if (path.Contains(MATERIAL_FILENAME_SUFFIX_INSIDE_MASK)) {
 						correctPath = path.Replace(MATERIAL_FILENAME_SUFFIX_INSIDE_MASK, "");
 						correctPath = path.Replace(MATERIAL_FILENAME_SUFFIX_INSIDE_MASK, "");
-					}
-					else if (path.Contains(MATERIAL_FILENAME_SUFFIX_OUTSIDE_MASK)) {
+					} else if (path.Contains(MATERIAL_FILENAME_SUFFIX_OUTSIDE_MASK)) {
 						correctPath = path.Replace(MATERIAL_FILENAME_SUFFIX_OUTSIDE_MASK, "");
 						correctPath = path.Replace(MATERIAL_FILENAME_SUFFIX_OUTSIDE_MASK, "");
 					}
 					}
 
 
@@ -212,14 +203,13 @@ namespace Spine.Unity.Editor {
 						maskMaterials.materialsMaskDisabled[i] = material;
 						maskMaterials.materialsMaskDisabled[i] = material;
 					}
 					}
 				}
 				}
-			}
-			else {
+			} else {
 				maskMaterials.materialsMaskDisabled = currentMaterials;
 				maskMaterials.materialsMaskDisabled = currentMaterials;
 			}
 			}
 			return true;
 			return true;
 		}
 		}
 
 
-		public static Material EditorCreateOrLoadMaskMaterialAsset(SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials,
+		public static Material EditorCreateOrLoadMaskMaterialAsset (SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials,
 																UnityEngine.Rendering.CompareFunction maskFunction, Material originalMaterial) {
 																UnityEngine.Rendering.CompareFunction maskFunction, Material originalMaterial) {
 			string originalMaterialPath = UnityEditor.AssetDatabase.GetAssetPath(originalMaterial);
 			string originalMaterialPath = UnityEditor.AssetDatabase.GetAssetPath(originalMaterial);
 			int posOfExtensionDot = originalMaterialPath.LastIndexOf('.');
 			int posOfExtensionDot = originalMaterialPath.LastIndexOf('.');

+ 65 - 64
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs

@@ -36,6 +36,7 @@
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.IO;
 using System.IO;
 using System.Linq;
 using System.Linq;
+using System.Text;
 using UnityEditor;
 using UnityEditor;
 using UnityEngine;
 using UnityEngine;
 
 
@@ -80,7 +81,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		public static void GenerateMecanimAnimationClips (SkeletonDataAsset skeletonDataAsset) {
 		public static void GenerateMecanimAnimationClips (SkeletonDataAsset skeletonDataAsset) {
-			var data = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
 			if (data == null) {
 			if (data == null) {
 				Debug.LogError("SkeletonData loading failed!", skeletonDataAsset);
 				Debug.LogError("SkeletonData loading failed!", skeletonDataAsset);
 				return;
 				return;
@@ -110,16 +111,16 @@ namespace Spine.Unity.Editor {
 
 
 			UnityEngine.Object[] objs = AssetDatabase.LoadAllAssetsAtPath(controllerPath);
 			UnityEngine.Object[] objs = AssetDatabase.LoadAllAssetsAtPath(controllerPath);
 
 
-			var unityAnimationClipTable = new Dictionary<string, AnimationClip>();
-			var spineAnimationTable = new Dictionary<string, Spine.Animation>();
+			Dictionary<string, AnimationClip> unityAnimationClipTable = new Dictionary<string, AnimationClip>();
+			Dictionary<string, Animation> spineAnimationTable = new Dictionary<string, Spine.Animation>();
 
 
-			foreach (var o in objs) {
+			foreach (UnityEngine.Object o in objs) {
 				//Debug.LogFormat("({0}){1} : {3} + {2} + {4}", o.GetType(), o.name, o.hideFlags, o.GetInstanceID(), o.GetHashCode());
 				//Debug.LogFormat("({0}){1} : {3} + {2} + {4}", o.GetType(), o.name, o.hideFlags, o.GetInstanceID(), o.GetHashCode());
 				// There is a bug in Unity 5.3.3 (and likely before) that creates
 				// There is a bug in Unity 5.3.3 (and likely before) that creates
 				// a duplicate AnimationClip when you duplicate a Mecanim Animator State.
 				// a duplicate AnimationClip when you duplicate a Mecanim Animator State.
 				// These duplicates seem to be identifiable by their HideFlags, so we'll exclude them.
 				// These duplicates seem to be identifiable by their HideFlags, so we'll exclude them.
 				if (o is AnimationClip) {
 				if (o is AnimationClip) {
-					var clip = o as AnimationClip;
+					AnimationClip clip = o as AnimationClip;
 					if (!clip.HasFlag(HideFlags.HideInHierarchy)) {
 					if (!clip.HasFlag(HideFlags.HideInHierarchy)) {
 						if (unityAnimationClipTable.ContainsKey(clip.name)) {
 						if (unityAnimationClipTable.ContainsKey(clip.name)) {
 							Debug.LogWarningFormat("Duplicate AnimationClips were found named {0}", clip.name);
 							Debug.LogWarningFormat("Duplicate AnimationClips were found named {0}", clip.name);
@@ -129,7 +130,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 			}
 			}
 
 
-			foreach (var animations in data.Animations) {
+			foreach (Animation animations in data.Animations) {
 				string animationName = animations.Name; // Review for unsafe names. Requires runtime implementation too.
 				string animationName = animations.Name; // Review for unsafe names. Requires runtime implementation too.
 				spineAnimationTable.Add(animationName, animations);
 				spineAnimationTable.Add(animationName, animations);
 
 
@@ -144,12 +145,12 @@ namespace Spine.Unity.Editor {
 
 
 				AnimationClip clip = unityAnimationClipTable[animationName];
 				AnimationClip clip = unityAnimationClipTable[animationName];
 				clip.SetCurve("", typeof(GameObject), "dummy", AnimationCurve.Linear(0, 0, animations.Duration, 0));
 				clip.SetCurve("", typeof(GameObject), "dummy", AnimationCurve.Linear(0, 0, animations.Duration, 0));
-				var settings = AnimationUtility.GetAnimationClipSettings(clip);
+				AnimationClipSettings settings = AnimationUtility.GetAnimationClipSettings(clip);
 				settings.stopTime = animations.Duration;
 				settings.stopTime = animations.Duration;
 				SetAnimationSettings(clip, settings);
 				SetAnimationSettings(clip, settings);
 
 
-				var previousAnimationEvents = AnimationUtility.GetAnimationEvents(clip);
-				var animationEvents = new List<AnimationEvent>();
+				AnimationEvent[] previousAnimationEvents = AnimationUtility.GetAnimationEvents(clip);
+				List<AnimationEvent> animationEvents = new List<AnimationEvent>();
 				foreach (Timeline t in animations.Timelines) {
 				foreach (Timeline t in animations.Timelines) {
 					if (t is EventTimeline)
 					if (t is EventTimeline)
 						ParseEventTimeline(ref animationEvents, (EventTimeline)t, SendMessageOptions.DontRequireReceiver);
 						ParseEventTimeline(ref animationEvents, (EventTimeline)t, SendMessageOptions.DontRequireReceiver);
@@ -161,7 +162,7 @@ namespace Spine.Unity.Editor {
 				unityAnimationClipTable.Remove(animationName);
 				unityAnimationClipTable.Remove(animationName);
 			}
 			}
 
 
-			foreach (var clip in unityAnimationClipTable.Values) {
+			foreach (AnimationClip clip in unityAnimationClipTable.Values) {
 				AnimationClip.DestroyImmediate(clip, true);
 				AnimationClip.DestroyImmediate(clip, true);
 			}
 			}
 
 
@@ -192,14 +193,14 @@ namespace Spine.Unity.Editor {
 				System.IO.Directory.CreateDirectory(outputPath);
 				System.IO.Directory.CreateDirectory(outputPath);
 			}
 			}
 
 
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			bool hasAnimations = bakeAnimations && skeletonData.Animations.Count > 0;
 			bool hasAnimations = bakeAnimations && skeletonData.Animations.Count > 0;
 			UnityEditor.Animations.AnimatorController controller = null;
 			UnityEditor.Animations.AnimatorController controller = null;
 			if (hasAnimations) {
 			if (hasAnimations) {
 				string controllerPath = outputPath + "/" + skeletonDataAsset.skeletonJSON.name + " Controller.controller";
 				string controllerPath = outputPath + "/" + skeletonDataAsset.skeletonJSON.name + " Controller.controller";
 				bool newAnimContainer = false;
 				bool newAnimContainer = false;
 
 
-				var runtimeController = AssetDatabase.LoadAssetAtPath(controllerPath, typeof(RuntimeAnimatorController));
+				UnityEngine.Object runtimeController = AssetDatabase.LoadAssetAtPath(controllerPath, typeof(RuntimeAnimatorController));
 
 
 				if (runtimeController != null) {
 				if (runtimeController != null) {
 					controller = (UnityEditor.Animations.AnimatorController)runtimeController;
 					controller = (UnityEditor.Animations.AnimatorController)runtimeController;
@@ -208,13 +209,13 @@ namespace Spine.Unity.Editor {
 					newAnimContainer = true;
 					newAnimContainer = true;
 				}
 				}
 
 
-				var existingClipTable = new Dictionary<string, AnimationClip>();
-				var unusedClipNames = new List<string>();
+				Dictionary<string, AnimationClip> existingClipTable = new Dictionary<string, AnimationClip>();
+				List<string> unusedClipNames = new List<string>();
 				Object[] animObjs = AssetDatabase.LoadAllAssetsAtPath(controllerPath);
 				Object[] animObjs = AssetDatabase.LoadAllAssetsAtPath(controllerPath);
 
 
 				foreach (Object o in animObjs) {
 				foreach (Object o in animObjs) {
 					if (o is AnimationClip) {
 					if (o is AnimationClip) {
-						var clip = (AnimationClip)o;
+						AnimationClip clip = (AnimationClip)o;
 						existingClipTable.Add(clip.name, clip);
 						existingClipTable.Add(clip.name, clip);
 						unusedClipNames.Add(clip.name);
 						unusedClipNames.Add(clip.name);
 					}
 					}
@@ -227,10 +228,10 @@ namespace Spine.Unity.Editor {
 				for (int s = 0; s < skeletonData.Slots.Count; s++) {
 				for (int s = 0; s < skeletonData.Slots.Count; s++) {
 					List<string> attachmentNames = new List<string>();
 					List<string> attachmentNames = new List<string>();
 					for (int i = 0; i < skinCount; i++) {
 					for (int i = 0; i < skinCount; i++) {
-						var skin = skins.Items[i];
-						var skinEntries = new List<Skin.SkinEntry>();
+						Skin skin = skins.Items[i];
+						List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 						skin.GetAttachments(s, skinEntries);
 						skin.GetAttachments(s, skinEntries);
-						foreach (var entry in skinEntries) {
+						foreach (Skin.SkinEntry entry in skinEntries) {
 							if (!attachmentNames.Contains(entry.Name))
 							if (!attachmentNames.Contains(entry.Name))
 								attachmentNames.Add(entry.Name);
 								attachmentNames.Add(entry.Name);
 						}
 						}
@@ -238,7 +239,7 @@ namespace Spine.Unity.Editor {
 					slotLookup.Add(s, attachmentNames);
 					slotLookup.Add(s, attachmentNames);
 				}
 				}
 
 
-				foreach (var anim in skeletonData.Animations) {
+				foreach (Animation anim in skeletonData.Animations) {
 
 
 					AnimationClip clip = null;
 					AnimationClip clip = null;
 					if (existingClipTable.ContainsKey(anim.Name)) {
 					if (existingClipTable.ContainsKey(anim.Name)) {
@@ -273,7 +274,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 			}
 			}
 
 
-			foreach (var skin in skins) {
+			foreach (Skin skin in skins) {
 				bool newPrefab = false;
 				bool newPrefab = false;
 
 
 				string prefabPath = outputPath + "/" + skeletonDataAsset.skeletonJSON.name + " (" + skin.Name + ").prefab";
 				string prefabPath = outputPath + "/" + skeletonDataAsset.skeletonJSON.name + " (" + skin.Name + ").prefab";
@@ -293,8 +294,8 @@ namespace Spine.Unity.Editor {
 
 
 				Dictionary<string, Mesh> meshTable = new Dictionary<string, Mesh>();
 				Dictionary<string, Mesh> meshTable = new Dictionary<string, Mesh>();
 				List<string> unusedMeshNames = new List<string>();
 				List<string> unusedMeshNames = new List<string>();
-				Object[] assets = AssetDatabase.LoadAllAssetsAtPath(prefabPath);
-				foreach (var obj in assets) {
+				UnityEngine.Object[] assets = AssetDatabase.LoadAllAssetsAtPath(prefabPath);
+				foreach (UnityEngine.Object obj in assets) {
 					if (obj is Mesh) {
 					if (obj is Mesh) {
 						meshTable.Add(obj.name, (Mesh)obj);
 						meshTable.Add(obj.name, (Mesh)obj);
 						unusedMeshNames.Add(obj.name);
 						unusedMeshNames.Add(obj.name);
@@ -309,7 +310,7 @@ namespace Spine.Unity.Editor {
 
 
 				//create bones
 				//create bones
 				for (int i = 0; i < skeletonData.Bones.Count; i++) {
 				for (int i = 0; i < skeletonData.Bones.Count; i++) {
-					var boneData = skeletonData.Bones.Items[i];
+					BoneData boneData = skeletonData.Bones.Items[i];
 					Transform boneTransform = EditorInstantiation.NewGameObject(boneData.Name, true).transform;
 					Transform boneTransform = EditorInstantiation.NewGameObject(boneData.Name, true).transform;
 					boneTransform.parent = prefabRoot.transform;
 					boneTransform.parent = prefabRoot.transform;
 					boneTable.Add(boneTransform.name, boneTransform);
 					boneTable.Add(boneTransform.name, boneTransform);
@@ -318,7 +319,7 @@ namespace Spine.Unity.Editor {
 
 
 				for (int i = 0; i < skeletonData.Bones.Count; i++) {
 				for (int i = 0; i < skeletonData.Bones.Count; i++) {
 
 
-					var boneData = skeletonData.Bones.Items[i];
+					BoneData boneData = skeletonData.Bones.Items[i];
 					Transform boneTransform = boneTable[boneData.Name];
 					Transform boneTransform = boneTable[boneData.Name];
 					Transform parentTransform = null;
 					Transform parentTransform = null;
 					if (i > 0)
 					if (i > 0)
@@ -328,7 +329,7 @@ namespace Spine.Unity.Editor {
 
 
 					boneTransform.parent = parentTransform;
 					boneTransform.parent = parentTransform;
 					boneTransform.localPosition = new Vector3(boneData.X, boneData.Y, 0);
 					boneTransform.localPosition = new Vector3(boneData.X, boneData.Y, 0);
-					var tm = boneData.TransformMode;
+					TransformMode tm = boneData.TransformMode;
 					if (tm.InheritsRotation())
 					if (tm.InheritsRotation())
 						boneTransform.localRotation = Quaternion.Euler(0, 0, boneData.Rotation);
 						boneTransform.localRotation = Quaternion.Euler(0, 0, boneData.Rotation);
 					else
 					else
@@ -340,18 +341,18 @@ namespace Spine.Unity.Editor {
 
 
 				//create slots and attachments
 				//create slots and attachments
 				for (int slotIndex = 0; slotIndex < skeletonData.Slots.Count; slotIndex++) {
 				for (int slotIndex = 0; slotIndex < skeletonData.Slots.Count; slotIndex++) {
-					var slotData = skeletonData.Slots.Items[slotIndex];
+					SlotData slotData = skeletonData.Slots.Items[slotIndex];
 					Transform slotTransform = EditorInstantiation.NewGameObject(slotData.Name, true).transform;
 					Transform slotTransform = EditorInstantiation.NewGameObject(slotData.Name, true).transform;
 					slotTransform.parent = prefabRoot.transform;
 					slotTransform.parent = prefabRoot.transform;
 					slotTable.Add(slotData.Name, slotTransform);
 					slotTable.Add(slotData.Name, slotTransform);
 
 
-					var skinEntries = new List<Skin.SkinEntry>();
+					List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 					skin.GetAttachments(slotIndex, skinEntries);
 					skin.GetAttachments(slotIndex, skinEntries);
 					if (skin != skeletonData.DefaultSkin)
 					if (skin != skeletonData.DefaultSkin)
 						skeletonData.DefaultSkin.GetAttachments(slotIndex, skinEntries);
 						skeletonData.DefaultSkin.GetAttachments(slotIndex, skinEntries);
 
 
 					for (int a = 0; a < skinEntries.Count; a++) {
 					for (int a = 0; a < skinEntries.Count; a++) {
-						var attachment = skinEntries[a].Attachment;
+						Attachment attachment = skinEntries[a].Attachment;
 						string attachmentName = skinEntries[a].Name;
 						string attachmentName = skinEntries[a].Name;
 						string attachmentMeshName = "[" + slotData.Name + "] " + attachmentName;
 						string attachmentMeshName = "[" + slotData.Name + "] " + attachmentName;
 						Vector3 offset = Vector3.zero;
 						Vector3 offset = Vector3.zero;
@@ -363,7 +364,7 @@ namespace Spine.Unity.Editor {
 						if (meshTable.ContainsKey(attachmentMeshName))
 						if (meshTable.ContainsKey(attachmentMeshName))
 							mesh = meshTable[attachmentMeshName];
 							mesh = meshTable[attachmentMeshName];
 						if (attachment is RegionAttachment) {
 						if (attachment is RegionAttachment) {
-							var regionAttachment = (RegionAttachment)attachment;
+							RegionAttachment regionAttachment = (RegionAttachment)attachment;
 							offset.x = regionAttachment.X;
 							offset.x = regionAttachment.X;
 							offset.y = regionAttachment.Y;
 							offset.y = regionAttachment.Y;
 							rotation = regionAttachment.Rotation;
 							rotation = regionAttachment.Rotation;
@@ -373,7 +374,7 @@ namespace Spine.Unity.Editor {
 							if (newPrefab || meshTable.ContainsKey(attachmentMeshName) == false)
 							if (newPrefab || meshTable.ContainsKey(attachmentMeshName) == false)
 								AssetDatabase.AddObjectToAsset(mesh, prefab);
 								AssetDatabase.AddObjectToAsset(mesh, prefab);
 						} else if (attachment is MeshAttachment) {
 						} else if (attachment is MeshAttachment) {
-							var meshAttachment = (MeshAttachment)attachment;
+							MeshAttachment meshAttachment = (MeshAttachment)attachment;
 							isWeightedMesh = (meshAttachment.Bones != null);
 							isWeightedMesh = (meshAttachment.Bones != null);
 							offset.x = 0;
 							offset.x = 0;
 							offset.y = 0;
 							offset.y = 0;
@@ -400,7 +401,7 @@ namespace Spine.Unity.Editor {
 						if (isWeightedMesh) {
 						if (isWeightedMesh) {
 							attachmentTransform.position = Vector3.zero;
 							attachmentTransform.position = Vector3.zero;
 							attachmentTransform.rotation = Quaternion.identity;
 							attachmentTransform.rotation = Quaternion.identity;
-							var skinnedMeshRenderer = attachmentTransform.gameObject.AddComponent<SkinnedMeshRenderer>();
+							SkinnedMeshRenderer skinnedMeshRenderer = attachmentTransform.gameObject.AddComponent<SkinnedMeshRenderer>();
 							skinnedMeshRenderer.rootBone = boneList[0];
 							skinnedMeshRenderer.rootBone = boneList[0];
 							skinnedMeshRenderer.bones = boneList.ToArray();
 							skinnedMeshRenderer.bones = boneList.ToArray();
 							skinnedMeshRenderer.sharedMesh = mesh;
 							skinnedMeshRenderer.sharedMesh = mesh;
@@ -418,7 +419,7 @@ namespace Spine.Unity.Editor {
 
 
 				}
 				}
 
 
-				foreach (var slotData in skeletonData.Slots) {
+				foreach (SlotData slotData in skeletonData.Slots) {
 					Transform slotTransform = slotTable[slotData.Name];
 					Transform slotTransform = slotTable[slotData.Name];
 					slotTransform.parent = boneTable[slotData.BoneData.Name];
 					slotTransform.parent = boneTable[slotData.BoneData.Name];
 					slotTransform.localPosition = Vector3.zero;
 					slotTransform.localPosition = Vector3.zero;
@@ -427,7 +428,7 @@ namespace Spine.Unity.Editor {
 				}
 				}
 
 
 				if (hasAnimations) {
 				if (hasAnimations) {
-					var animator = prefabRoot.AddComponent<Animator>();
+					Animator animator = prefabRoot.AddComponent<Animator>();
 					animator.applyRootMotion = false;
 					animator.applyRootMotion = false;
 					animator.runtimeAnimatorController = (RuntimeAnimatorController)controller;
 					animator.runtimeAnimatorController = (RuntimeAnimatorController)controller;
 					EditorGUIUtility.PingObject(controller);
 					EditorGUIUtility.PingObject(controller);
@@ -503,8 +504,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		internal static Mesh ExtractRegionAttachment (string name, RegionAttachment attachment, Mesh mesh = null, bool centered = true) {
 		internal static Mesh ExtractRegionAttachment (string name, RegionAttachment attachment, Mesh mesh = null, bool centered = true) {
-			var slot = GetDummySlot();
-			var bone = slot.Bone;
+			Slot slot = GetDummySlot();
+			Bone bone = slot.Bone;
 
 
 			if (centered) {
 			if (centered) {
 				bone.X = -attachment.X;
 				bone.X = -attachment.X;
@@ -544,7 +545,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		internal static Mesh ExtractMeshAttachment (string name, MeshAttachment attachment, Mesh mesh = null) {
 		internal static Mesh ExtractMeshAttachment (string name, MeshAttachment attachment, Mesh mesh = null) {
-			var slot = GetDummySlot();
+			Slot slot = GetDummySlot();
 
 
 			slot.Bone.X = 0;
 			slot.Bone.X = 0;
 			slot.Bone.Y = 0;
 			slot.Bone.Y = 0;
@@ -640,8 +641,8 @@ namespace Spine.Unity.Editor {
 			mesh.RecalculateBounds();
 			mesh.RecalculateBounds();
 
 
 			// Handle weights and binding
 			// Handle weights and binding
-			var weightTable = new Dictionary<int, BoneWeightContainer>();
-			var warningBuilder = new System.Text.StringBuilder();
+			Dictionary<int, BoneWeightContainer> weightTable = new Dictionary<int, BoneWeightContainer>();
+			StringBuilder warningBuilder = new System.Text.StringBuilder();
 
 
 			int[] bones = attachment.Bones;
 			int[] bones = attachment.Bones;
 			float[] weights = attachment.Vertices;
 			float[] weights = attachment.Vertices;
@@ -668,9 +669,9 @@ namespace Spine.Unity.Editor {
 
 
 			for (int i = 0; i < weightTable.Count; i++) {
 			for (int i = 0; i < weightTable.Count; i++) {
 				BoneWeight bw = new BoneWeight();
 				BoneWeight bw = new BoneWeight();
-				var container = weightTable[i];
+				BoneWeightContainer container = weightTable[i];
 
 
-				var pairs = container.pairs.OrderByDescending(pair => pair.weight).ToList();
+				List<BoneWeightContainer.Pair> pairs = container.pairs.OrderByDescending(pair => pair.weight).ToList();
 
 
 				for (int b = 0; b < pairs.Count; b++) {
 				for (int b = 0; b < pairs.Count; b++) {
 					if (b > 3) {
 					if (b > 3) {
@@ -746,9 +747,9 @@ namespace Spine.Unity.Editor {
 
 
 		#region Animation Baking
 		#region Animation Baking
 		static AnimationClip ExtractAnimation (string name, SkeletonData skeletonData, Dictionary<int, List<string>> slotLookup, bool bakeIK, SendMessageOptions eventOptions, AnimationClip clip = null) {
 		static AnimationClip ExtractAnimation (string name, SkeletonData skeletonData, Dictionary<int, List<string>> slotLookup, bool bakeIK, SendMessageOptions eventOptions, AnimationClip clip = null) {
-			var animation = skeletonData.FindAnimation(name);
+			Animation animation = skeletonData.FindAnimation(name);
 
 
-			var timelines = animation.Timelines;
+			ExposedList<Timeline> timelines = animation.Timelines;
 
 
 			if (clip == null) {
 			if (clip == null) {
 				clip = new AnimationClip();
 				clip = new AnimationClip();
@@ -809,7 +810,7 @@ namespace Spine.Unity.Editor {
 
 
 			}
 			}
 
 
-			var settings = AnimationUtility.GetAnimationClipSettings(clip);
+			AnimationClipSettings settings = AnimationUtility.GetAnimationClipSettings(clip);
 			settings.loopTime = true;
 			settings.loopTime = true;
 			settings.stopTime = Mathf.Max(clip.length, 0.001f);
 			settings.stopTime = Mathf.Max(clip.length, 0.001f);
 
 
@@ -901,8 +902,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void ParseTranslateTimeline (Skeleton skeleton, TranslateTimeline timeline, AnimationClip clip) {
 		static void ParseTranslateTimeline (Skeleton skeleton, TranslateTimeline timeline, AnimationClip clip) {
-			var boneData = skeleton.Data.Bones.Items[timeline.BoneIndex];
-			var bone = skeleton.Bones.Items[timeline.BoneIndex];
+			BoneData boneData = skeleton.Data.Bones.Items[timeline.BoneIndex];
+			Bone bone = skeleton.Bones.Items[timeline.BoneIndex];
 
 
 			AnimationCurve xCurve = new AnimationCurve();
 			AnimationCurve xCurve = new AnimationCurve();
 			AnimationCurve yCurve = new AnimationCurve();
 			AnimationCurve yCurve = new AnimationCurve();
@@ -1044,8 +1045,8 @@ namespace Spine.Unity.Editor {
 			CurveTimeline1 timeline = isXTimeline ? timelineX : timelineY as CurveTimeline1;
 			CurveTimeline1 timeline = isXTimeline ? timelineX : timelineY as CurveTimeline1;
 			IBoneTimeline boneTimeline = isXTimeline ? timelineX : timelineY as IBoneTimeline;
 			IBoneTimeline boneTimeline = isXTimeline ? timelineX : timelineY as IBoneTimeline;
 
 
-			var boneData = skeleton.Data.Bones.Items[boneTimeline.BoneIndex];
-			var bone = skeleton.Bones.Items[boneTimeline.BoneIndex];
+			BoneData boneData = skeleton.Data.Bones.Items[boneTimeline.BoneIndex];
+			Bone bone = skeleton.Bones.Items[boneTimeline.BoneIndex];
 			float boneDataOffset = isXTimeline ? boneData.X : boneData.Y;
 			float boneDataOffset = isXTimeline ? boneData.X : boneData.Y;
 
 
 			AnimationCurve curve = new AnimationCurve();
 			AnimationCurve curve = new AnimationCurve();
@@ -1137,8 +1138,8 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void ParseScaleTimeline (Skeleton skeleton, ScaleTimeline timeline, AnimationClip clip) {
 		static void ParseScaleTimeline (Skeleton skeleton, ScaleTimeline timeline, AnimationClip clip) {
-			var boneData = skeleton.Data.Bones.Items[timeline.BoneIndex];
-			var bone = skeleton.Bones.Items[timeline.BoneIndex];
+			BoneData boneData = skeleton.Data.Bones.Items[timeline.BoneIndex];
+			Bone bone = skeleton.Bones.Items[timeline.BoneIndex];
 
 
 			AnimationCurve xCurve = new AnimationCurve();
 			AnimationCurve xCurve = new AnimationCurve();
 			AnimationCurve yCurve = new AnimationCurve();
 			AnimationCurve yCurve = new AnimationCurve();
@@ -1275,8 +1276,8 @@ namespace Spine.Unity.Editor {
 			CurveTimeline1 timeline = isXTimeline ? timelineX : timelineY as CurveTimeline1;
 			CurveTimeline1 timeline = isXTimeline ? timelineX : timelineY as CurveTimeline1;
 			IBoneTimeline boneTimeline = isXTimeline ? timelineX : timelineY as IBoneTimeline;
 			IBoneTimeline boneTimeline = isXTimeline ? timelineX : timelineY as IBoneTimeline;
 
 
-			var boneData = skeleton.Data.Bones.Items[boneTimeline.BoneIndex];
-			var bone = skeleton.Bones.Items[boneTimeline.BoneIndex];
+			BoneData boneData = skeleton.Data.Bones.Items[boneTimeline.BoneIndex];
+			Bone bone = skeleton.Bones.Items[boneTimeline.BoneIndex];
 			float boneDataOffset = isXTimeline ? boneData.ScaleX : boneData.ScaleY;
 			float boneDataOffset = isXTimeline ? boneData.ScaleX : boneData.ScaleY;
 
 
 			AnimationCurve curve = new AnimationCurve();
 			AnimationCurve curve = new AnimationCurve();
@@ -1366,16 +1367,16 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void ParseRotateTimeline (Skeleton skeleton, RotateTimeline timeline, AnimationClip clip) {
 		static void ParseRotateTimeline (Skeleton skeleton, RotateTimeline timeline, AnimationClip clip) {
-			var boneData = skeleton.Data.Bones.Items[timeline.BoneIndex];
-			var bone = skeleton.Bones.Items[timeline.BoneIndex];
+			BoneData boneData = skeleton.Data.Bones.Items[timeline.BoneIndex];
+			Bone bone = skeleton.Bones.Items[timeline.BoneIndex];
 
 
-			var curve = new AnimationCurve();
+			AnimationCurve curve = new AnimationCurve();
 
 
 			float endTime = timeline.Frames[(timeline.FrameCount * 2) - 2];
 			float endTime = timeline.Frames[(timeline.FrameCount * 2) - 2];
 
 
 			float currentTime = timeline.Frames[0];
 			float currentTime = timeline.Frames[0];
 
 
-			var keys = new List<Keyframe>();
+			List<Keyframe> keys = new List<Keyframe>();
 
 
 			float rotation = timeline.Frames[1] + boneData.Rotation;
 			float rotation = timeline.Frames[1] + boneData.Rotation;
 
 
@@ -1500,7 +1501,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void ParseEventTimeline (EventTimeline timeline, AnimationClip clip, SendMessageOptions eventOptions) {
 		static void ParseEventTimeline (EventTimeline timeline, AnimationClip clip, SendMessageOptions eventOptions) {
-			var animationEvents = new List<AnimationEvent>();
+			List<AnimationEvent> animationEvents = new List<AnimationEvent>();
 			ParseEventTimeline(ref animationEvents, timeline, eventOptions);
 			ParseEventTimeline(ref animationEvents, timeline, eventOptions);
 			AnimationUtility.SetAnimationEvents(clip, animationEvents.ToArray());
 			AnimationUtility.SetAnimationEvents(clip, animationEvents.ToArray());
 		}
 		}
@@ -1509,16 +1510,16 @@ namespace Spine.Unity.Editor {
 			EventTimeline timeline, SendMessageOptions eventOptions) {
 			EventTimeline timeline, SendMessageOptions eventOptions) {
 
 
 			float[] frames = timeline.Frames;
 			float[] frames = timeline.Frames;
-			var events = timeline.Events;
+			Event[] events = timeline.Events;
 
 
 			for (int i = 0, n = frames.Length; i < n; i++) {
 			for (int i = 0, n = frames.Length; i < n; i++) {
-				var spineEvent = events[i];
+				Event spineEvent = events[i];
 				string eventName = spineEvent.Data.Name;
 				string eventName = spineEvent.Data.Name;
 				if (SpineEditorUtilities.Preferences.mecanimEventIncludeFolderName)
 				if (SpineEditorUtilities.Preferences.mecanimEventIncludeFolderName)
 					eventName = eventName.Replace("/", ""); // calls method FolderNameEventName()
 					eventName = eventName.Replace("/", ""); // calls method FolderNameEventName()
 				else
 				else
 					eventName = eventName.Substring(eventName.LastIndexOf('/') + 1); // calls method EventName()
 					eventName = eventName.Substring(eventName.LastIndexOf('/') + 1); // calls method EventName()
-				var unityAnimationEvent = new AnimationEvent {
+				AnimationEvent unityAnimationEvent = new AnimationEvent {
 					time = frames[i],
 					time = frames[i],
 					functionName = eventName,
 					functionName = eventName,
 					messageOptions = eventOptions,
 					messageOptions = eventOptions,
@@ -1541,7 +1542,7 @@ namespace Spine.Unity.Editor {
 			foreach (AnimationEvent previousEvent in previousEvents) {
 			foreach (AnimationEvent previousEvent in previousEvents) {
 				if (previousEvent.stringParameter == SpineEventStringId)
 				if (previousEvent.stringParameter == SpineEventStringId)
 					continue;
 					continue;
-				var identicalEvent = allEvents.Find(newEvent => {
+				AnimationEvent identicalEvent = allEvents.Find(newEvent => {
 					return newEvent.functionName == previousEvent.functionName &&
 					return newEvent.functionName == previousEvent.functionName &&
 						Mathf.Abs(newEvent.time - previousEvent.time) < EventTimeEqualityEpsilon;
 						Mathf.Abs(newEvent.time - previousEvent.time) < EventTimeEqualityEpsilon;
 				});
 				});
@@ -1553,7 +1554,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static void ParseAttachmentTimeline (Skeleton skeleton, AttachmentTimeline timeline, Dictionary<int, List<string>> slotLookup, AnimationClip clip) {
 		static void ParseAttachmentTimeline (Skeleton skeleton, AttachmentTimeline timeline, Dictionary<int, List<string>> slotLookup, AnimationClip clip) {
-			var attachmentNames = slotLookup[timeline.SlotIndex];
+			List<string> attachmentNames = slotLookup[timeline.SlotIndex];
 
 
 			string bonePath = GetPath(skeleton.Slots.Items[timeline.SlotIndex].Bone.Data);
 			string bonePath = GetPath(skeleton.Slots.Items[timeline.SlotIndex].Bone.Data);
 			string slotPath = bonePath + "/" + skeleton.Slots.Items[timeline.SlotIndex].Data.Name;
 			string slotPath = bonePath + "/" + skeleton.Slots.Items[timeline.SlotIndex].Data.Name;
@@ -1568,7 +1569,7 @@ namespace Spine.Unity.Editor {
 
 
 			if (frames[0] != 0) {
 			if (frames[0] != 0) {
 				string startingName = skeleton.Slots.Items[timeline.SlotIndex].Data.AttachmentName;
 				string startingName = skeleton.Slots.Items[timeline.SlotIndex].Data.AttachmentName;
-				foreach (var pair in curveTable) {
+				foreach (KeyValuePair<string, AnimationCurve> pair in curveTable) {
 					if (startingName == "" || startingName == null) {
 					if (startingName == "" || startingName == null) {
 						pair.Value.AddKey(new Keyframe(0, 0, float.PositiveInfinity, float.PositiveInfinity));
 						pair.Value.AddKey(new Keyframe(0, 0, float.PositiveInfinity, float.PositiveInfinity));
 					} else {
 					} else {
@@ -1590,7 +1591,7 @@ namespace Spine.Unity.Editor {
 				int frameIndex = Search(frames, time);
 				int frameIndex = Search(frames, time);
 
 
 				string name = timeline.AttachmentNames[frameIndex];
 				string name = timeline.AttachmentNames[frameIndex];
-				foreach (var pair in curveTable) {
+				foreach (KeyValuePair<string, AnimationCurve> pair in curveTable) {
 					if (name == "") {
 					if (name == "") {
 						pair.Value.AddKey(new Keyframe(time, 0, float.PositiveInfinity, float.PositiveInfinity));
 						pair.Value.AddKey(new Keyframe(time, 0, float.PositiveInfinity, float.PositiveInfinity));
 					} else {
 					} else {
@@ -1606,7 +1607,7 @@ namespace Spine.Unity.Editor {
 				f += 1;
 				f += 1;
 			}
 			}
 
 
-			foreach (var pair in curveTable) {
+			foreach (KeyValuePair<string, AnimationCurve> pair in curveTable) {
 				string path = slotPath + "/" + pair.Key;
 				string path = slotPath + "/" + pair.Key;
 				string prop = "m_IsActive";
 				string prop = "m_IsActive";
 
 

+ 5 - 5
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBakingWindow.cs

@@ -42,7 +42,7 @@ namespace Spine.Unity.Editor {
 
 
 		[MenuItem("CONTEXT/SkeletonDataAsset/Skeleton Baking", false, 5000)]
 		[MenuItem("CONTEXT/SkeletonDataAsset/Skeleton Baking", false, 5000)]
 		public static void Init (MenuCommand command) {
 		public static void Init (MenuCommand command) {
-			var window = EditorWindow.GetWindow<SkeletonBakingWindow>(IsUtilityWindow);
+			SkeletonBakingWindow window = EditorWindow.GetWindow<SkeletonBakingWindow>(IsUtilityWindow);
 			window.minSize = new Vector2(330f, 530f);
 			window.minSize = new Vector2(330f, 530f);
 			window.maxSize = new Vector2(600f, 1000f);
 			window.maxSize = new Vector2(600f, 1000f);
 			window.titleContent = new GUIContent("Skeleton Baking", Icons.spine);
 			window.titleContent = new GUIContent("Skeleton Baking", Icons.spine);
@@ -94,7 +94,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.HelpBox(BakingWarningMessage, MessageType.Info, true);
 			EditorGUILayout.HelpBox(BakingWarningMessage, MessageType.Info, true);
 
 
 			EditorGUI.BeginChangeCheck();
 			EditorGUI.BeginChangeCheck();
-			var skeletonDataAssetProperty = so.FindProperty("skeletonDataAsset");
+			SerializedProperty skeletonDataAssetProperty = so.FindProperty("skeletonDataAsset");
 			EditorGUILayout.PropertyField(skeletonDataAssetProperty, SpineInspectorUtility.TempContent("SkeletonDataAsset", Icons.spine));
 			EditorGUILayout.PropertyField(skeletonDataAssetProperty, SpineInspectorUtility.TempContent("SkeletonDataAsset", Icons.spine));
 			if (EditorGUI.EndChangeCheck()) {
 			if (EditorGUI.EndChangeCheck()) {
 				so.ApplyModifiedProperties();
 				so.ApplyModifiedProperties();
@@ -103,7 +103,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.Space();
 			EditorGUILayout.Space();
 
 
 			if (skeletonDataAsset == null) return;
 			if (skeletonDataAsset == null) return;
-			var skeletonData = skeletonDataAsset.GetSkeletonData(false);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(false);
 			if (skeletonData == null) return;
 			if (skeletonData == null) return;
 			bool hasExtraSkins = skeletonData.Skins.Count > 1;
 			bool hasExtraSkins = skeletonData.Skins.Count > 1;
 
 
@@ -121,7 +121,7 @@ namespace Spine.Unity.Editor {
 					}
 					}
 
 
 					int totalAttachments = 0;
 					int totalAttachments = 0;
-					foreach (var s in skeletonData.Skins)
+					foreach (Skin s in skeletonData.Skins)
 						totalAttachments += s.Attachments.Count;
 						totalAttachments += s.Attachments.Count;
 					EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Total Attachments: " + totalAttachments, Icons.genericAttachment));
 					EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Total Attachments: " + totalAttachments, Icons.genericAttachment));
 				}
 				}
@@ -145,7 +145,7 @@ namespace Spine.Unity.Editor {
 			if (!string.IsNullOrEmpty(skinToBake) && UnityEngine.Event.current.type == EventType.Repaint)
 			if (!string.IsNullOrEmpty(skinToBake) && UnityEngine.Event.current.type == EventType.Repaint)
 				bakeSkin = skeletonData.FindSkin(skinToBake) ?? skeletonData.DefaultSkin;
 				bakeSkin = skeletonData.FindSkin(skinToBake) ?? skeletonData.DefaultSkin;
 
 
-			var prefabIcon = EditorGUIUtility.FindTexture("PrefabModel Icon");
+			Texture2D prefabIcon = EditorGUIUtility.FindTexture("PrefabModel Icon");
 
 
 			if (hasExtraSkins) {
 			if (hasExtraSkins) {
 				EditorGUI.BeginChangeCheck();
 				EditorGUI.BeginChangeCheck();

+ 23 - 26
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonDebugWindow.cs

@@ -51,7 +51,7 @@ namespace Spine.Unity.Editor {
 
 
 		[MenuItem("CONTEXT/SkeletonRenderer/Open Skeleton Debug Window", false, 5000)]
 		[MenuItem("CONTEXT/SkeletonRenderer/Open Skeleton Debug Window", false, 5000)]
 		public static void Init () {
 		public static void Init () {
-			var window = EditorWindow.GetWindow<SkeletonDebugWindow>(IsUtilityWindow);
+			SkeletonDebugWindow window = EditorWindow.GetWindow<SkeletonDebugWindow>(IsUtilityWindow);
 			window.minSize = new Vector2(330f, 360f);
 			window.minSize = new Vector2(330f, 360f);
 			window.maxSize = new Vector2(600f, 4000f);
 			window.maxSize = new Vector2(600f, 4000f);
 			window.titleContent = new GUIContent("Skeleton Debug", Icons.spine);
 			window.titleContent = new GUIContent("Skeleton Debug", Icons.spine);
@@ -92,7 +92,7 @@ namespace Spine.Unity.Editor {
 			if (skeleton == null || skeletonRenderer == null || !skeletonRenderer.valid || isPrefab)
 			if (skeleton == null || skeletonRenderer == null || !skeletonRenderer.valid || isPrefab)
 				return;
 				return;
 
 
-			var transform = skeletonRenderer.transform;
+			Transform transform = skeletonRenderer.transform;
 			if (showPaths) SpineHandles.DrawPaths(transform, skeleton);
 			if (showPaths) SpineHandles.DrawPaths(transform, skeleton);
 			if (showConstraints) SpineHandles.DrawConstraints(transform, skeleton);
 			if (showConstraints) SpineHandles.DrawConstraints(transform, skeleton);
 			if (showBoneNames) SpineHandles.DrawBoneNames(transform, skeleton);
 			if (showBoneNames) SpineHandles.DrawBoneNames(transform, skeleton);
@@ -115,11 +115,11 @@ namespace Spine.Unity.Editor {
 
 
 			bool noSkeletonRenderer = false;
 			bool noSkeletonRenderer = false;
 
 
-			var selectedObject = Selection.activeGameObject;
+			GameObject selectedObject = Selection.activeGameObject;
 			if (selectedObject == null) {
 			if (selectedObject == null) {
 				noSkeletonRenderer = true;
 				noSkeletonRenderer = true;
 			} else {
 			} else {
-				var selectedSkeletonRenderer = selectedObject.GetComponent<SkeletonRenderer>();
+				SkeletonRenderer selectedSkeletonRenderer = selectedObject.GetComponent<SkeletonRenderer>();
 				if (selectedSkeletonRenderer == null) {
 				if (selectedSkeletonRenderer == null) {
 					noSkeletonRenderer = true;
 					noSkeletonRenderer = true;
 				} else if (skeletonRenderer != selectedSkeletonRenderer) {
 				} else if (skeletonRenderer != selectedSkeletonRenderer) {
@@ -165,7 +165,7 @@ namespace Spine.Unity.Editor {
 
 
 		static void FalseDropDown (string label, string stringValue, Texture2D icon = null, bool disabledGroup = false) {
 		static void FalseDropDown (string label, string stringValue, Texture2D icon = null, bool disabledGroup = false) {
 			if (disabledGroup) EditorGUI.BeginDisabledGroup(true);
 			if (disabledGroup) EditorGUI.BeginDisabledGroup(true);
-			var pos = EditorGUILayout.GetControlRect(true);
+			Rect pos = EditorGUILayout.GetControlRect(true);
 			pos = EditorGUI.PrefixLabel(pos, SpineInspectorUtility.TempContent(label));
 			pos = EditorGUI.PrefixLabel(pos, SpineInspectorUtility.TempContent(label));
 			GUI.Button(pos, SpineInspectorUtility.TempContent(stringValue, icon), EditorStyles.popup);
 			GUI.Button(pos, SpineInspectorUtility.TempContent(stringValue, icon), EditorStyles.popup);
 			if (disabledGroup) EditorGUI.EndDisabledGroup();
 			if (disabledGroup) EditorGUI.EndDisabledGroup();
@@ -275,7 +275,7 @@ namespace Spine.Unity.Editor {
 
 
 								if (bone != null) {
 								if (bone != null) {
 									using (new EditorGUI.DisabledGroupScope(true)) {
 									using (new EditorGUI.DisabledGroupScope(true)) {
-										var wm = EditorGUIUtility.wideMode;
+										bool wm = EditorGUIUtility.wideMode;
 										EditorGUIUtility.wideMode = true;
 										EditorGUIUtility.wideMode = true;
 										EditorGUILayout.Slider("Local Rotation", ViewRound(bone.Rotation), -180f, 180f);
 										EditorGUILayout.Slider("Local Rotation", ViewRound(bone.Rotation), -180f, 180f);
 										EditorGUILayout.Vector2Field("Local Position", RoundVector2(bone.X, bone.Y));
 										EditorGUILayout.Vector2Field("Local Position", RoundVector2(bone.X, bone.Y));
@@ -284,12 +284,12 @@ namespace Spine.Unity.Editor {
 
 
 										EditorGUILayout.Space();
 										EditorGUILayout.Space();
 
 
-										var boneParent = bone.Parent;
+										Bone boneParent = bone.Parent;
 										if (boneParent != null) FalseDropDown("Parent", boneParent.Data.Name, Icons.bone);
 										if (boneParent != null) FalseDropDown("Parent", boneParent.Data.Name, Icons.bone);
 
 
 										const string RoundFormat = "0.##";
 										const string RoundFormat = "0.##";
-										var lw = EditorGUIUtility.labelWidth;
-										var fw = EditorGUIUtility.fieldWidth;
+										float lw = EditorGUIUtility.labelWidth;
+										float fw = EditorGUIUtility.fieldWidth;
 										EditorGUIUtility.labelWidth *= 0.25f;
 										EditorGUIUtility.labelWidth *= 0.25f;
 										EditorGUIUtility.fieldWidth *= 0.5f;
 										EditorGUIUtility.fieldWidth *= 0.5f;
 										EditorGUILayout.LabelField("LocalToWorld");
 										EditorGUILayout.LabelField("LocalToWorld");
@@ -352,11 +352,11 @@ namespace Spine.Unity.Editor {
 								}
 								}
 							}
 							}
 
 
-							foreach (var skinEntry in pair.Value) {
-								var attachment = skinEntry.Attachment;
+							foreach (Skin.SkinEntry skinEntry in pair.Value) {
+								Attachment attachment = skinEntry.Attachment;
 								GUI.contentColor = slot.Attachment == attachment ? Color.white : Color.grey;
 								GUI.contentColor = slot.Attachment == attachment ? Color.white : Color.grey;
 								EditorGUI.indentLevel = baseIndent + 2;
 								EditorGUI.indentLevel = baseIndent + 2;
-								var icon = Icons.GetAttachmentIcon(attachment);
+								Texture2D icon = Icons.GetAttachmentIcon(attachment);
 								bool isAttached = (attachment == slot.Attachment);
 								bool isAttached = (attachment == slot.Attachment);
 								bool swap = EditorGUILayout.ToggleLeft(SpineInspectorUtility.TempContent(attachment.Name, icon), attachment == slot.Attachment);
 								bool swap = EditorGUILayout.ToggleLeft(SpineInspectorUtility.TempContent(attachment.Name, icon), attachment == slot.Attachment);
 								if (isAttached != swap) {
 								if (isAttached != swap) {
@@ -387,7 +387,7 @@ namespace Spine.Unity.Editor {
 							EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(string.Format("IK Constraints ({0})", skeleton.IkConstraints.Count), Icons.constraintIK), EditorStyles.boldLabel);
 							EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(string.Format("IK Constraints ({0})", skeleton.IkConstraints.Count), Icons.constraintIK), EditorStyles.boldLabel);
 							using (new SpineInspectorUtility.IndentScope()) {
 							using (new SpineInspectorUtility.IndentScope()) {
 								if (skeleton.IkConstraints.Count > 0) {
 								if (skeleton.IkConstraints.Count > 0) {
-									foreach (var c in skeleton.IkConstraints) {
+									foreach (IkConstraint c in skeleton.IkConstraints) {
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintIK));
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintIK));
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone, true);
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone, true);
 										using (new EditorGUI.DisabledGroupScope(true)) {
 										using (new EditorGUI.DisabledGroupScope(true)) {
@@ -412,7 +412,7 @@ namespace Spine.Unity.Editor {
 							EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(string.Format("Transform Constraints ({0})", skeleton.TransformConstraints.Count), Icons.constraintTransform), EditorStyles.boldLabel);
 							EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(string.Format("Transform Constraints ({0})", skeleton.TransformConstraints.Count), Icons.constraintTransform), EditorStyles.boldLabel);
 							using (new SpineInspectorUtility.IndentScope()) {
 							using (new SpineInspectorUtility.IndentScope()) {
 								if (skeleton.TransformConstraints.Count > 0) {
 								if (skeleton.TransformConstraints.Count > 0) {
-									foreach (var c in skeleton.TransformConstraints) {
+									foreach (TransformConstraint c in skeleton.TransformConstraints) {
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintTransform));
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintTransform));
 										EditorGUI.BeginDisabledGroup(true);
 										EditorGUI.BeginDisabledGroup(true);
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone);
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone);
@@ -442,11 +442,11 @@ namespace Spine.Unity.Editor {
 
 
 							using (new SpineInspectorUtility.IndentScope()) {
 							using (new SpineInspectorUtility.IndentScope()) {
 								if (skeleton.PathConstraints.Count > 0) {
 								if (skeleton.PathConstraints.Count > 0) {
-									foreach (var c in skeleton.PathConstraints) {
+									foreach (PathConstraint c in skeleton.PathConstraints) {
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintPath));
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintPath));
 										EditorGUI.BeginDisabledGroup(true);
 										EditorGUI.BeginDisabledGroup(true);
 										FalseDropDown("Path Slot", c.Data.Target.Name, Icons.slot);
 										FalseDropDown("Path Slot", c.Data.Target.Name, Icons.slot);
-										var activeAttachment = c.Target.Attachment;
+										Attachment activeAttachment = c.Target.Attachment;
 										FalseDropDown("Active Path", activeAttachment != null ? activeAttachment.Name : "<None>", activeAttachment is PathAttachment ? Icons.path : null);
 										FalseDropDown("Active Path", activeAttachment != null ? activeAttachment.Name : "<None>", activeAttachment is PathAttachment ? Icons.path : null);
 										EditorGUILayout.LabelField("PositionMode." + c.Data.PositionMode);
 										EditorGUILayout.LabelField("PositionMode." + c.Data.PositionMode);
 										EditorGUILayout.LabelField("SpacingMode." + c.Data.SpacingMode);
 										EditorGUILayout.LabelField("SpacingMode." + c.Data.SpacingMode);
@@ -473,9 +473,6 @@ namespace Spine.Unity.Editor {
 				}
 				}
 
 
 				showDrawOrderTree.target = EditorGUILayout.Foldout(showDrawOrderTree.target, SpineInspectorUtility.TempContent("Draw Order and Separators", Icons.slotRoot), BoldFoldoutStyle);
 				showDrawOrderTree.target = EditorGUILayout.Foldout(showDrawOrderTree.target, SpineInspectorUtility.TempContent("Draw Order and Separators", Icons.slotRoot), BoldFoldoutStyle);
-
-				//var separatorSlotNamesField =
-				//SpineInspectorUtility.ge
 				if (showDrawOrderTree.faded > 0) {
 				if (showDrawOrderTree.faded > 0) {
 					using (new SpineInspectorUtility.IndentScope()) {
 					using (new SpineInspectorUtility.IndentScope()) {
 						using (new EditorGUILayout.FadeGroupScope(showDrawOrderTree.faded)) {
 						using (new EditorGUILayout.FadeGroupScope(showDrawOrderTree.faded)) {
@@ -483,7 +480,7 @@ namespace Spine.Unity.Editor {
 							const string SeparatorString = "------------- v SEPARATOR v -------------";
 							const string SeparatorString = "------------- v SEPARATOR v -------------";
 
 
 							if (Application.isPlaying) {
 							if (Application.isPlaying) {
-								foreach (var slot in skeleton.DrawOrder) {
+								foreach (Slot slot in skeleton.DrawOrder) {
 									if (skeletonRenderer.separatorSlots.Contains(slot)) EditorGUILayout.LabelField(SeparatorString);
 									if (skeletonRenderer.separatorSlots.Contains(slot)) EditorGUILayout.LabelField(SeparatorString);
 
 
 									using (new EditorGUI.DisabledScope(!slot.Bone.Active)) {
 									using (new EditorGUI.DisabledScope(!slot.Bone.Active)) {
@@ -491,8 +488,8 @@ namespace Spine.Unity.Editor {
 									}
 									}
 								}
 								}
 							} else {
 							} else {
-								foreach (var slot in skeleton.DrawOrder) {
-									var slotNames = SkeletonRendererInspector.GetSeparatorSlotNames(skeletonRenderer);
+								foreach (Slot slot in skeleton.DrawOrder) {
+									string[] slotNames = SkeletonRendererInspector.GetSeparatorSlotNames(skeletonRenderer);
 									for (int i = 0, n = slotNames.Length; i < n; i++) {
 									for (int i = 0, n = slotNames.Length; i < n; i++) {
 										if (string.Equals(slotNames[i], slot.Data.Name, System.StringComparison.Ordinal)) {
 										if (string.Equals(slotNames[i], slot.Data.Name, System.StringComparison.Ordinal)) {
 											EditorGUILayout.LabelField(SeparatorString);
 											EditorGUILayout.LabelField(SeparatorString);
@@ -514,7 +511,7 @@ namespace Spine.Unity.Editor {
 					using (new SpineInspectorUtility.IndentScope()) {
 					using (new SpineInspectorUtility.IndentScope()) {
 						using (new EditorGUILayout.FadeGroupScope(showEventDataTree.faded)) {
 						using (new EditorGUILayout.FadeGroupScope(showEventDataTree.faded)) {
 							if (skeleton.Data.Events.Count > 0) {
 							if (skeleton.Data.Events.Count > 0) {
-								foreach (var e in skeleton.Data.Events) {
+								foreach (EventData e in skeleton.Data.Events) {
 									EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(e.Name, Icons.userEvent));
 									EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(e.Name, Icons.userEvent));
 								}
 								}
 							} else {
 							} else {
@@ -529,7 +526,7 @@ namespace Spine.Unity.Editor {
 					using (new SpineInspectorUtility.IndentScope()) {
 					using (new SpineInspectorUtility.IndentScope()) {
 						using (new EditorGUILayout.FadeGroupScope(showDataTree.faded)) {
 						using (new EditorGUILayout.FadeGroupScope(showDataTree.faded)) {
 							using (new SpineInspectorUtility.LabelWidthScope()) {
 							using (new SpineInspectorUtility.LabelWidthScope()) {
-								var skeletonData = skeleton.Data;
+								SkeletonData skeletonData = skeleton.Data;
 								EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Bones", Icons.bone, "Skeleton.Data.Bones"), new GUIContent(skeletonData.Bones.Count.ToString()));
 								EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Bones", Icons.bone, "Skeleton.Data.Bones"), new GUIContent(skeletonData.Bones.Count.ToString()));
 								EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Slots", Icons.slotRoot, "Skeleton.Data.Slots"), new GUIContent(skeletonData.Slots.Count.ToString()));
 								EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Slots", Icons.slotRoot, "Skeleton.Data.Slots"), new GUIContent(skeletonData.Slots.Count.ToString()));
 								EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Skins", Icons.skinsRoot, "Skeleton.Data.Skins"), new GUIContent(skeletonData.Skins.Count.ToString()));
 								EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Skins", Icons.skinsRoot, "Skeleton.Data.Skins"), new GUIContent(skeletonData.Skins.Count.ToString()));
@@ -568,7 +565,7 @@ namespace Spine.Unity.Editor {
 		}
 		}
 
 
 		static bool IsAnimating (params AnimBool[] animBools) {
 		static bool IsAnimating (params AnimBool[] animBools) {
-			foreach (var a in animBools)
+			foreach (AnimBool a in animBools)
 				if (a.isAnimating) return true;
 				if (a.isAnimating) return true;
 			return false;
 			return false;
 		}
 		}
@@ -581,7 +578,7 @@ namespace Spine.Unity.Editor {
 
 
 			attachmentTable.Clear();
 			attachmentTable.Clear();
 			for (int i = skeleton.Slots.Count - 1; i >= 0; i--) {
 			for (int i = skeleton.Slots.Count - 1; i >= 0; i--) {
-				var attachments = new List<Skin.SkinEntry>();
+				List<Skin.SkinEntry> attachments = new List<Skin.SkinEntry>();
 				attachmentTable.Add(skeleton.Slots.Items[i], attachments);
 				attachmentTable.Add(skeleton.Slots.Items[i], attachments);
 				// Add skin attachments.
 				// Add skin attachments.
 				skin.GetAttachments(i, attachments);
 				skin.GetAttachments(i, attachments);

+ 6 - 6
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs

@@ -223,7 +223,7 @@ namespace Spine.Unity.Editor {
 			string[] guids = AssetDatabase.FindAssets(typeSearchString);
 			string[] guids = AssetDatabase.FindAssets(typeSearchString);
 			foreach (string guid in guids) {
 			foreach (string guid in guids) {
 				string path = AssetDatabase.GUIDToAssetPath(guid);
 				string path = AssetDatabase.GUIDToAssetPath(guid);
-				var preferences = AssetDatabase.LoadAssetAtPath<SpinePreferences>(path);
+				SpinePreferences preferences = AssetDatabase.LoadAssetAtPath<SpinePreferences>(path);
 				if (preferences != null)
 				if (preferences != null)
 					return preferences;
 					return preferences;
 			}
 			}
@@ -234,7 +234,7 @@ namespace Spine.Unity.Editor {
 			string blendType, bool isTexturePresetPMA) {
 			string blendType, bool isTexturePresetPMA) {
 
 
 			EditorGUILayout.PropertyField(blendModeMaterialProperty, new GUIContent(blendType + " Material", blendType + " blend mode Material template."));
 			EditorGUILayout.PropertyField(blendModeMaterialProperty, new GUIContent(blendType + " Material", blendType + " blend mode Material template."));
-			var material = blendModeMaterialProperty.objectReferenceValue as Material;
+			Material material = blendModeMaterialProperty.objectReferenceValue as Material;
 			if (material == null)
 			if (material == null)
 				return;
 				return;
 
 
@@ -276,12 +276,12 @@ namespace Spine.Unity.Editor {
 					SpineEditorUtilities.ShaderPropertyField(settings.FindProperty("defaultShader"), new GUIContent("Default Shader"), SpinePreferences.DEFAULT_DEFAULT_SHADER);
 					SpineEditorUtilities.ShaderPropertyField(settings.FindProperty("defaultShader"), new GUIContent("Default Shader"), SpinePreferences.DEFAULT_DEFAULT_SHADER);
 
 
 					EditorGUILayout.PropertyField(settings.FindProperty("setTextureImporterSettings"), new GUIContent("Apply Atlas Texture Settings", "Apply reference settings for Texture Importers."));
 					EditorGUILayout.PropertyField(settings.FindProperty("setTextureImporterSettings"), new GUIContent("Apply Atlas Texture Settings", "Apply reference settings for Texture Importers."));
-					var textureSettingsRef = settings.FindProperty("textureSettingsReference");
+					SerializedProperty textureSettingsRef = settings.FindProperty("textureSettingsReference");
 					SpineEditorUtilities.PresetAssetPropertyField(textureSettingsRef, new GUIContent("Atlas Texture Settings", "Apply the selected texture import settings at newly imported atlas textures. When exporting atlas textures from Spine with \"Premultiply alpha\" enabled (the default), you can leave it at \"PMATexturePreset\". If you have disabled \"Premultiply alpha\", set it to \"StraightAlphaTexturePreset\". You can also create your own TextureImporter Preset asset and assign it here."));
 					SpineEditorUtilities.PresetAssetPropertyField(textureSettingsRef, new GUIContent("Atlas Texture Settings", "Apply the selected texture import settings at newly imported atlas textures. When exporting atlas textures from Spine with \"Premultiply alpha\" enabled (the default), you can leave it at \"PMATexturePreset\". If you have disabled \"Premultiply alpha\", set it to \"StraightAlphaTexturePreset\". You can also create your own TextureImporter Preset asset and assign it here."));
 					if (string.IsNullOrEmpty(textureSettingsRef.stringValue)) {
 					if (string.IsNullOrEmpty(textureSettingsRef.stringValue)) {
-						var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
+						string[] pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
-							var assetPath = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
+							string assetPath = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
 							if (!string.IsNullOrEmpty(assetPath))
 							if (!string.IsNullOrEmpty(assetPath))
 								textureSettingsRef.stringValue = assetPath;
 								textureSettingsRef.stringValue = assetPath;
 						}
 						}
@@ -323,7 +323,7 @@ namespace Spine.Unity.Editor {
 				EditorGUILayout.LabelField("Handles and Gizmos", EditorStyles.boldLabel);
 				EditorGUILayout.LabelField("Handles and Gizmos", EditorStyles.boldLabel);
 				{
 				{
 					EditorGUI.BeginChangeCheck();
 					EditorGUI.BeginChangeCheck();
-					var scaleProperty = settings.FindProperty("handleScale");
+					SerializedProperty scaleProperty = settings.FindProperty("handleScale");
 					EditorGUILayout.PropertyField(scaleProperty, new GUIContent("Editor Bone Scale"));
 					EditorGUILayout.PropertyField(scaleProperty, new GUIContent("Editor Bone Scale"));
 					if (EditorGUI.EndChangeCheck()) {
 					if (EditorGUI.EndChangeCheck()) {
 						EditorPrefs.SetFloat(SpinePreferences.SCENE_ICONS_SCALE_KEY, scaleProperty.floatValue);
 						EditorPrefs.SetFloat(SpinePreferences.SCENE_ICONS_SCALE_KEY, scaleProperty.floatValue);

+ 4 - 4
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpriteAtlasImportWindow.cs

@@ -42,7 +42,7 @@ namespace Spine.Unity.Editor {
 
 
 		[MenuItem("Window/Spine/SpriteAtlas Import", false, 5000)]
 		[MenuItem("Window/Spine/SpriteAtlas Import", false, 5000)]
 		public static void Init (MenuCommand command) {
 		public static void Init (MenuCommand command) {
-			var window = EditorWindow.GetWindow<SpriteAtlasImportWindow>(IsUtilityWindow);
+			SpriteAtlasImportWindow window = EditorWindow.GetWindow<SpriteAtlasImportWindow>(IsUtilityWindow);
 			window.minSize = new Vector2(284f, 256f);
 			window.minSize = new Vector2(284f, 256f);
 			window.maxSize = new Vector2(500f, 256f);
 			window.maxSize = new Vector2(500f, 256f);
 			window.titleContent = new GUIContent("Spine SpriteAtlas Import", Icons.spine);
 			window.titleContent = new GUIContent("Spine SpriteAtlas Import", Icons.spine);
@@ -74,7 +74,7 @@ namespace Spine.Unity.Editor {
 
 
 			using (new SpineInspectorUtility.BoxScope()) {
 			using (new SpineInspectorUtility.BoxScope()) {
 				EditorGUI.BeginChangeCheck();
 				EditorGUI.BeginChangeCheck();
-				var spriteAtlasAssetProperty = so.FindProperty("spriteAtlasAsset");
+				SerializedProperty spriteAtlasAssetProperty = so.FindProperty("spriteAtlasAsset");
 				EditorGUILayout.PropertyField(spriteAtlasAssetProperty, new GUIContent("SpriteAtlas", EditorGUIUtility.IconContent("SpriteAtlas Icon").image));
 				EditorGUILayout.PropertyField(spriteAtlasAssetProperty, new GUIContent("SpriteAtlas", EditorGUIUtility.IconContent("SpriteAtlas Icon").image));
 				if (EditorGUI.EndChangeCheck()) {
 				if (EditorGUI.EndChangeCheck()) {
 					so.ApplyModifiedProperties();
 					so.ApplyModifiedProperties();
@@ -86,7 +86,7 @@ namespace Spine.Unity.Editor {
 					}
 					}
 				}
 				}
 
 
-				var spineSpriteAtlasAssetProperty = so.FindProperty("spineSpriteAtlasAsset");
+				SerializedProperty spineSpriteAtlasAssetProperty = so.FindProperty("spineSpriteAtlasAsset");
 				EditorGUI.BeginChangeCheck();
 				EditorGUI.BeginChangeCheck();
 				EditorGUILayout.PropertyField(spineSpriteAtlasAssetProperty, new GUIContent("SpineSpriteAtlasAsset", EditorGUIUtility.IconContent("ScriptableObject Icon").image));
 				EditorGUILayout.PropertyField(spineSpriteAtlasAssetProperty, new GUIContent("SpineSpriteAtlasAsset", EditorGUIUtility.IconContent("ScriptableObject Icon").image));
 				if (spineSpriteAtlasAssetProperty.objectReferenceValue == null) {
 				if (spineSpriteAtlasAssetProperty.objectReferenceValue == null) {
@@ -120,7 +120,7 @@ namespace Spine.Unity.Editor {
 			using (new SpineInspectorUtility.BoxScope()) {
 			using (new SpineInspectorUtility.BoxScope()) {
 
 
 				using (new EditorGUI.DisabledScope(!isAtlasComplete)) {
 				using (new EditorGUI.DisabledScope(!isAtlasComplete)) {
-					var skeletonDataAssetProperty = so.FindProperty("skeletonDataFile");
+					SerializedProperty skeletonDataAssetProperty = so.FindProperty("skeletonDataFile");
 					EditorGUI.BeginChangeCheck();
 					EditorGUI.BeginChangeCheck();
 					EditorGUILayout.PropertyField(skeletonDataAssetProperty, SpineInspectorUtility.TempContent("Skeleton json/skel file", Icons.spine));
 					EditorGUILayout.PropertyField(skeletonDataAssetProperty, SpineInspectorUtility.TempContent("Skeleton json/skel file", Icons.spine));
 					if (EditorGUI.EndChangeCheck()) {
 					if (EditorGUI.EndChangeCheck()) {

+ 4 - 4
spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonPartsRendererInspector.cs

@@ -46,10 +46,10 @@ namespace Spine.Unity.Examples {
 			if (!serializedObject.isEditingMultipleObjects) {
 			if (!serializedObject.isEditingMultipleObjects) {
 				EditorGUILayout.Space();
 				EditorGUILayout.Space();
 				if (SpineInspectorUtility.LargeCenteredButton(new GUIContent("Select SkeletonRenderer", SpineEditorUtilities.Icons.spine))) {
 				if (SpineInspectorUtility.LargeCenteredButton(new GUIContent("Select SkeletonRenderer", SpineEditorUtilities.Icons.spine))) {
-					var thisSkeletonPartsRenderer = target as SkeletonPartsRenderer;
-					var srs = thisSkeletonPartsRenderer.GetComponentInParent<SkeletonRenderSeparator>();
-					if (srs != null && srs.partsRenderers.Contains(thisSkeletonPartsRenderer) && srs.SkeletonRenderer != null)
-						Selection.activeGameObject = srs.SkeletonRenderer.gameObject;
+					SkeletonPartsRenderer thisSkeletonPartsRenderer = target as SkeletonPartsRenderer;
+					SkeletonRenderSeparator separator = thisSkeletonPartsRenderer.GetComponentInParent<SkeletonRenderSeparator>();
+					if (separator != null && separator.partsRenderers.Contains(thisSkeletonPartsRenderer) && separator.SkeletonRenderer != null)
+						Selection.activeGameObject = separator.SkeletonRenderer.gameObject;
 				}
 				}
 			}
 			}
 		}
 		}

+ 22 - 22
spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonRenderSeparatorInspector.cs

@@ -62,7 +62,7 @@ namespace Spine.Unity.Examples {
 			copyPropertyBlock_ = serializedObject.FindProperty("copyPropertyBlock");
 			copyPropertyBlock_ = serializedObject.FindProperty("copyPropertyBlock");
 			copyMeshRendererFlags_ = serializedObject.FindProperty("copyMeshRendererFlags");
 			copyMeshRendererFlags_ = serializedObject.FindProperty("copyMeshRendererFlags");
 
 
-			var partsRenderers = component.partsRenderers;
+			List<SkeletonPartsRenderer> partsRenderers = component.partsRenderers;
 			partsRenderers_ = serializedObject.FindProperty("partsRenderers");
 			partsRenderers_ = serializedObject.FindProperty("partsRenderers");
 			partsRenderers_.isExpanded = partsRenderersExpanded ||  // last state
 			partsRenderers_.isExpanded = partsRenderersExpanded ||  // last state
 				partsRenderers.Contains(null) ||    // null items found
 				partsRenderers.Contains(null) ||    // null items found
@@ -87,7 +87,7 @@ namespace Spine.Unity.Examples {
 			bool isMeshFilterAlwaysNull = false;
 			bool isMeshFilterAlwaysNull = false;
 #if UNITY_EDITOR && NEW_PREFAB_SYSTEM
 #if UNITY_EDITOR && NEW_PREFAB_SYSTEM
 			// Don't store mesh or material at the prefab, otherwise it will permanently reload
 			// Don't store mesh or material at the prefab, otherwise it will permanently reload
-			var prefabType = UnityEditor.PrefabUtility.GetPrefabAssetType(component);
+			PrefabAssetType prefabType = UnityEditor.PrefabUtility.GetPrefabAssetType(component);
 			if (UnityEditor.PrefabUtility.IsPartOfPrefabAsset(component) &&
 			if (UnityEditor.PrefabUtility.IsPartOfPrefabAsset(component) &&
 				(prefabType == UnityEditor.PrefabAssetType.Regular || prefabType == UnityEditor.PrefabAssetType.Variant)) {
 				(prefabType == UnityEditor.PrefabAssetType.Regular || prefabType == UnityEditor.PrefabAssetType.Variant)) {
 				isMeshFilterAlwaysNull = true;
 				isMeshFilterAlwaysNull = true;
@@ -99,7 +99,7 @@ namespace Spine.Unity.Examples {
 				component.OnEnable();
 				component.OnEnable();
 			}
 			}
 
 
-			var componentRenderers = component.partsRenderers;
+			List<SkeletonPartsRenderer> componentRenderers = component.partsRenderers;
 			int totalParts;
 			int totalParts;
 
 
 			using (new SpineInspectorUtility.LabelWidthScope()) {
 			using (new SpineInspectorUtility.LabelWidthScope()) {
@@ -122,7 +122,7 @@ namespace Spine.Unity.Examples {
 				{
 				{
 					EditorGUI.indentLevel++;
 					EditorGUI.indentLevel++;
 					EditorGUI.BeginChangeCheck();
 					EditorGUI.BeginChangeCheck();
-					var foldoutSkeletonRendererRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
+					Rect foldoutSkeletonRendererRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
 					EditorGUI.PropertyField(foldoutSkeletonRendererRect, skeletonRenderer_);
 					EditorGUI.PropertyField(foldoutSkeletonRendererRect, skeletonRenderer_);
 					if (EditorGUI.EndChangeCheck())
 					if (EditorGUI.EndChangeCheck())
 						serializedObject.ApplyModifiedProperties();
 						serializedObject.ApplyModifiedProperties();
@@ -170,7 +170,7 @@ namespace Spine.Unity.Examples {
 
 
 
 
 				totalParts = separatorCount + 1;
 				totalParts = separatorCount + 1;
-				var counterStyle = skeletonRendererExpanded ? EditorStyles.label : EditorStyles.miniLabel;
+				GUIStyle counterStyle = skeletonRendererExpanded ? EditorStyles.label : EditorStyles.miniLabel;
 				EditorGUILayout.LabelField(string.Format("{0}: separates into {1}.", SpineInspectorUtility.Pluralize(separatorCount, "separator", "separators"), SpineInspectorUtility.Pluralize(totalParts, "part", "parts")), counterStyle);
 				EditorGUILayout.LabelField(string.Format("{0}: separates into {1}.", SpineInspectorUtility.Pluralize(separatorCount, "separator", "separators"), SpineInspectorUtility.Pluralize(totalParts, "part", "parts")), counterStyle);
 			}
 			}
 
 
@@ -188,7 +188,7 @@ namespace Spine.Unity.Examples {
 				// (Button) Match Separators count
 				// (Button) Match Separators count
 				if (separatorNamesProp != null) {
 				if (separatorNamesProp != null) {
 					int currentRenderers = 0;
 					int currentRenderers = 0;
-					foreach (var r in componentRenderers) {
+					foreach (SkeletonPartsRenderer r in componentRenderers) {
 						if (r != null)
 						if (r != null)
 							currentRenderers++;
 							currentRenderers++;
 					}
 					}
@@ -214,7 +214,7 @@ namespace Spine.Unity.Examples {
 								// Do you really want to destroy all?
 								// Do you really want to destroy all?
 								Undo.RegisterCompleteObjectUndo(component, "Clear Parts Renderers");
 								Undo.RegisterCompleteObjectUndo(component, "Clear Parts Renderers");
 								if (EditorUtility.DisplayDialog("Destroy Renderers", "Do you really want to destroy all the Parts Renderer GameObjects in the list?", "Destroy", "Cancel")) {
 								if (EditorUtility.DisplayDialog("Destroy Renderers", "Do you really want to destroy all the Parts Renderer GameObjects in the list?", "Destroy", "Cancel")) {
-									foreach (var r in componentRenderers) {
+									foreach (SkeletonPartsRenderer r in componentRenderers) {
 										if (r != null)
 										if (r != null)
 											Undo.DestroyObjectImmediate(r.gameObject);
 											Undo.DestroyObjectImmediate(r.gameObject);
 									}
 									}
@@ -251,7 +251,7 @@ namespace Spine.Unity.Examples {
 		}
 		}
 
 
 		public void AddPartsRenderer (int count) {
 		public void AddPartsRenderer (int count) {
-			var componentRenderers = component.partsRenderers;
+			List<SkeletonPartsRenderer> componentRenderers = component.partsRenderers;
 			bool emptyFound = componentRenderers.Contains(null);
 			bool emptyFound = componentRenderers.Contains(null);
 			if (emptyFound) {
 			if (emptyFound) {
 				bool userClearEntries = EditorUtility.DisplayDialog("Empty entries found", "Null entries found. Do you want to remove null entries before adding the new renderer? ", "Clear Empty Entries", "Don't Clear");
 				bool userClearEntries = EditorUtility.DisplayDialog("Empty entries found", "Null entries found. Do you want to remove null entries before adding the new renderer? ", "Clear Empty Entries", "Don't Clear");
@@ -261,16 +261,16 @@ namespace Spine.Unity.Examples {
 			Undo.RegisterCompleteObjectUndo(component, "Add Parts Renderers");
 			Undo.RegisterCompleteObjectUndo(component, "Add Parts Renderers");
 			for (int i = 0; i < count; i++) {
 			for (int i = 0; i < count; i++) {
 				int index = componentRenderers.Count;
 				int index = componentRenderers.Count;
-				var smr = SkeletonPartsRenderer.NewPartsRendererGameObject(component.transform, index.ToString());
-				Undo.RegisterCreatedObjectUndo(smr.gameObject, "New Parts Renderer GameObject.");
-				componentRenderers.Add(smr);
+				SkeletonPartsRenderer partsRenderer = SkeletonPartsRenderer.NewPartsRendererGameObject(component.transform, index.ToString());
+				Undo.RegisterCreatedObjectUndo(partsRenderer.gameObject, "New Parts Renderer GameObject.");
+				componentRenderers.Add(partsRenderer);
 
 
 				// increment renderer sorting order.
 				// increment renderer sorting order.
 				if (index == 0) continue;
 				if (index == 0) continue;
-				var prev = componentRenderers[index - 1]; if (prev == null) continue;
+				SkeletonPartsRenderer prev = componentRenderers[index - 1]; if (prev == null) continue;
 
 
-				var prevMeshRenderer = prev.GetComponent<MeshRenderer>();
-				var currentMeshRenderer = smr.GetComponent<MeshRenderer>();
+				MeshRenderer prevMeshRenderer = prev.GetComponent<MeshRenderer>();
+				MeshRenderer currentMeshRenderer = partsRenderer.GetComponent<MeshRenderer>();
 				if (prevMeshRenderer == null || currentMeshRenderer == null) continue;
 				if (prevMeshRenderer == null || currentMeshRenderer == null) continue;
 
 
 				int prevSortingLayer = prevMeshRenderer.sortingLayerID;
 				int prevSortingLayer = prevMeshRenderer.sortingLayerID;
@@ -283,17 +283,17 @@ namespace Spine.Unity.Examples {
 
 
 		/// <summary>Detects orphaned parts renderers and offers to delete them.</summary>
 		/// <summary>Detects orphaned parts renderers and offers to delete them.</summary>
 		public void DetectOrphanedPartsRenderers (SkeletonRenderSeparator component) {
 		public void DetectOrphanedPartsRenderers (SkeletonRenderSeparator component) {
-			var children = component.GetComponentsInChildren<SkeletonPartsRenderer>();
+			SkeletonPartsRenderer[] children = component.GetComponentsInChildren<SkeletonPartsRenderer>();
 
 
-			var orphans = new System.Collections.Generic.List<SkeletonPartsRenderer>();
-			foreach (var r in children) {
+			List<SkeletonPartsRenderer> orphans = new System.Collections.Generic.List<SkeletonPartsRenderer>();
+			foreach (SkeletonPartsRenderer r in children) {
 				if (!component.partsRenderers.Contains(r))
 				if (!component.partsRenderers.Contains(r))
 					orphans.Add(r);
 					orphans.Add(r);
 			}
 			}
 
 
 			if (orphans.Count > 0) {
 			if (orphans.Count > 0) {
 				if (EditorUtility.DisplayDialog("Destroy Submesh Renderers", "Unassigned renderers were found. Do you want to delete them? (These may belong to another Render Separator in the same hierarchy. If you don't have another Render Separator component in the children of this GameObject, it's likely safe to delete. Warning: This operation cannot be undone.)", "Delete", "Cancel")) {
 				if (EditorUtility.DisplayDialog("Destroy Submesh Renderers", "Unassigned renderers were found. Do you want to delete them? (These may belong to another Render Separator in the same hierarchy. If you don't have another Render Separator component in the children of this GameObject, it's likely safe to delete. Warning: This operation cannot be undone.)", "Delete", "Cancel")) {
-					foreach (var o in orphans) {
+					foreach (SkeletonPartsRenderer o in orphans) {
 						Undo.DestroyObjectImmediate(o.gameObject);
 						Undo.DestroyObjectImmediate(o.gameObject);
 					}
 					}
 				}
 				}
@@ -303,8 +303,8 @@ namespace Spine.Unity.Examples {
 		#region SkeletonRenderer Context Menu Item
 		#region SkeletonRenderer Context Menu Item
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Skeleton Render Separator")]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Skeleton Render Separator")]
 		static void AddRenderSeparatorComponent (MenuCommand cmd) {
 		static void AddRenderSeparatorComponent (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
-			var newComponent = skeletonRenderer.gameObject.AddComponent<SkeletonRenderSeparator>();
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
+			SkeletonRenderSeparator newComponent = skeletonRenderer.gameObject.AddComponent<SkeletonRenderSeparator>();
 
 
 			Undo.RegisterCreatedObjectUndo(newComponent, "Add SkeletonRenderSeparator");
 			Undo.RegisterCreatedObjectUndo(newComponent, "Add SkeletonRenderSeparator");
 		}
 		}
@@ -312,8 +312,8 @@ namespace Spine.Unity.Examples {
 		// Validate
 		// Validate
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Skeleton Render Separator", true)]
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Skeleton Render Separator", true)]
 		static bool ValidateAddRenderSeparatorComponent (MenuCommand cmd) {
 		static bool ValidateAddRenderSeparatorComponent (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
-			var separator = skeletonRenderer.GetComponent<SkeletonRenderSeparator>();
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
+			SkeletonRenderSeparator separator = skeletonRenderer.GetComponent<SkeletonRenderSeparator>();
 			bool separatorNotOnObject = separator == null;
 			bool separatorNotOnObject = separator == null;
 			return separatorNotOnObject;
 			return separatorNotOnObject;
 		}
 		}

+ 18 - 18
spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/BlendModeMaterials.cs

@@ -53,11 +53,11 @@ namespace Spine.Unity {
 		public bool RequiresBlendModeMaterials { get { return requiresBlendModeMaterials; } set { requiresBlendModeMaterials = value; } }
 		public bool RequiresBlendModeMaterials { get { return requiresBlendModeMaterials; } set { requiresBlendModeMaterials = value; } }
 
 
 		public BlendMode BlendModeForMaterial (Material material) {
 		public BlendMode BlendModeForMaterial (Material material) {
-			foreach (var pair in multiplyMaterials)
+			foreach (ReplacementMaterial pair in multiplyMaterials)
 				if (pair.material == material) return BlendMode.Multiply;
 				if (pair.material == material) return BlendMode.Multiply;
-			foreach (var pair in additiveMaterials)
+			foreach (ReplacementMaterial pair in additiveMaterials)
 				if (pair.material == material) return BlendMode.Additive;
 				if (pair.material == material) return BlendMode.Additive;
-			foreach (var pair in screenMaterials)
+			foreach (ReplacementMaterial pair in screenMaterials)
 				if (pair.material == material) return BlendMode.Screen;
 				if (pair.material == material) return BlendMode.Screen;
 			return BlendMode.Normal;
 			return BlendMode.Normal;
 		}
 		}
@@ -72,18 +72,18 @@ namespace Spine.Unity {
 
 
 			if (skeletonData == null) return false;
 			if (skeletonData == null) return false;
 
 
-			var skinEntries = new List<Skin.SkinEntry>();
-			var slotsItems = skeletonData.Slots.Items;
+			List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
+			SlotData[] slotsItems = skeletonData.Slots.Items;
 			for (int slotIndex = 0, slotCount = skeletonData.Slots.Count; slotIndex < slotCount; slotIndex++) {
 			for (int slotIndex = 0, slotCount = skeletonData.Slots.Count; slotIndex < slotCount; slotIndex++) {
-				var slot = slotsItems[slotIndex];
+				SlotData slot = slotsItems[slotIndex];
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 
 
 				skinEntries.Clear();
 				skinEntries.Clear();
-				foreach (var skin in skeletonData.Skins)
+				foreach (Skin skin in skeletonData.Skins)
 					skin.GetAttachments(slotIndex, skinEntries);
 					skin.GetAttachments(slotIndex, skinEntries);
 
 
-				foreach (var entry in skinEntries) {
+				foreach (Skin.SkinEntry entry in skinEntries) {
 					if (entry.Attachment is IHasTextureRegion) {
 					if (entry.Attachment is IHasTextureRegion) {
 						requiresBlendModeMaterials = true;
 						requiresBlendModeMaterials = true;
 						return true;
 						return true;
@@ -98,10 +98,10 @@ namespace Spine.Unity {
 			if (!requiresBlendModeMaterials)
 			if (!requiresBlendModeMaterials)
 				return;
 				return;
 
 
-			var skinEntries = new List<Skin.SkinEntry>();
-			var slotsItems = skeletonData.Slots.Items;
+			List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
+			SlotData[] slotsItems = skeletonData.Slots.Items;
 			for (int slotIndex = 0, slotCount = skeletonData.Slots.Count; slotIndex < slotCount; slotIndex++) {
 			for (int slotIndex = 0, slotCount = skeletonData.Slots.Count; slotIndex < slotCount; slotIndex++) {
-				var slot = slotsItems[slotIndex];
+				SlotData slot = slotsItems[slotIndex];
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 
 
@@ -121,18 +121,18 @@ namespace Spine.Unity {
 					continue;
 					continue;
 
 
 				skinEntries.Clear();
 				skinEntries.Clear();
-				foreach (var skin in skeletonData.Skins)
+				foreach (Skin skin in skeletonData.Skins)
 					skin.GetAttachments(slotIndex, skinEntries);
 					skin.GetAttachments(slotIndex, skinEntries);
 
 
-				foreach (var entry in skinEntries) {
-					var renderableAttachment = entry.Attachment as IHasTextureRegion;
+				foreach (Skin.SkinEntry entry in skinEntries) {
+					IHasTextureRegion renderableAttachment = entry.Attachment as IHasTextureRegion;
 					if (renderableAttachment != null) {
 					if (renderableAttachment != null) {
 						if (renderableAttachment.Region != null) {
 						if (renderableAttachment.Region != null) {
 							renderableAttachment.Region = CloneAtlasRegionWithMaterial(
 							renderableAttachment.Region = CloneAtlasRegionWithMaterial(
 							(AtlasRegion)renderableAttachment.Region, replacementMaterials);
 							(AtlasRegion)renderableAttachment.Region, replacementMaterials);
 						} else {
 						} else {
 							if (renderableAttachment.Sequence != null) {
 							if (renderableAttachment.Sequence != null) {
-								var regions = renderableAttachment.Sequence.Regions;
+								TextureRegion[] regions = renderableAttachment.Sequence.Regions;
 								for (int i = 0; i < regions.Length; ++i) {
 								for (int i = 0; i < regions.Length; ++i) {
 									regions[i] = CloneAtlasRegionWithMaterial(
 									regions[i] = CloneAtlasRegionWithMaterial(
 										(AtlasRegion)regions[i], replacementMaterials);
 										(AtlasRegion)regions[i], replacementMaterials);
@@ -145,9 +145,9 @@ namespace Spine.Unity {
 		}
 		}
 
 
 		protected AtlasRegion CloneAtlasRegionWithMaterial (AtlasRegion originalRegion, List<ReplacementMaterial> replacementMaterials) {
 		protected AtlasRegion CloneAtlasRegionWithMaterial (AtlasRegion originalRegion, List<ReplacementMaterial> replacementMaterials) {
-			var newRegion = originalRegion.Clone();
+			AtlasRegion newRegion = originalRegion.Clone();
 			Material material = null;
 			Material material = null;
-			foreach (var replacement in replacementMaterials) {
+			foreach (ReplacementMaterial replacement in replacementMaterials) {
 				if (replacement.pageName == originalRegion.page.name) {
 				if (replacement.pageName == originalRegion.page.name) {
 					material = replacement.material;
 					material = replacement.material;
 					break;
 					break;
@@ -155,7 +155,7 @@ namespace Spine.Unity {
 			}
 			}
 
 
 			AtlasPage originalPage = originalRegion.page;
 			AtlasPage originalPage = originalRegion.page;
-			var newPage = originalPage.Clone();
+			AtlasPage newPage = originalPage.Clone();
 			newPage.rendererObject = material;
 			newPage.rendererObject = material;
 			newRegion.page = newPage;
 			newRegion.page = newPage;
 			return newRegion;
 			return newRegion;

+ 8 - 8
spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataAsset.cs

@@ -204,7 +204,7 @@ namespace Spine.Unity {
 				return null;
 				return null;
 
 
 			if (skeletonDataModifiers != null) {
 			if (skeletonDataModifiers != null) {
-				foreach (var modifier in skeletonDataModifiers) {
+				foreach (SkeletonDataModifierAsset modifier in skeletonDataModifiers) {
 					if (modifier != null && !(isUpgradingBlendModeMaterials && modifier is BlendModeMaterialsAsset)) {
 					if (modifier != null && !(isUpgradingBlendModeMaterials && modifier is BlendModeMaterialsAsset)) {
 						modifier.Apply(loadedSkeletonData);
 						modifier.Apply(loadedSkeletonData);
 					}
 					}
@@ -253,11 +253,11 @@ namespace Spine.Unity {
 		}
 		}
 
 
 		internal Atlas[] GetAtlasArray () {
 		internal Atlas[] GetAtlasArray () {
-			var returnList = new System.Collections.Generic.List<Atlas>(atlasAssets.Length);
+			List<Atlas> returnList = new System.Collections.Generic.List<Atlas>(atlasAssets.Length);
 			for (int i = 0; i < atlasAssets.Length; i++) {
 			for (int i = 0; i < atlasAssets.Length; i++) {
-				var aa = atlasAssets[i];
+				AtlasAssetBase aa = atlasAssets[i];
 				if (aa == null) continue;
 				if (aa == null) continue;
-				var a = aa.GetAtlas();
+				Atlas a = aa.GetAtlas();
 				if (a == null) continue;
 				if (a == null) continue;
 				returnList.Add(a);
 				returnList.Add(a);
 			}
 			}
@@ -265,8 +265,8 @@ namespace Spine.Unity {
 		}
 		}
 
 
 		internal static SkeletonData ReadSkeletonData (byte[] bytes, AttachmentLoader attachmentLoader, float scale) {
 		internal static SkeletonData ReadSkeletonData (byte[] bytes, AttachmentLoader attachmentLoader, float scale) {
-			using (var input = new MemoryStream(bytes)) {
-				var binary = new SkeletonBinary(attachmentLoader) {
+			using (MemoryStream input = new MemoryStream(bytes)) {
+				SkeletonBinary binary = new SkeletonBinary(attachmentLoader) {
 					Scale = scale
 					Scale = scale
 				};
 				};
 				return binary.ReadSkeletonData(input);
 				return binary.ReadSkeletonData(input);
@@ -274,8 +274,8 @@ namespace Spine.Unity {
 		}
 		}
 
 
 		internal static SkeletonData ReadSkeletonData (string text, AttachmentLoader attachmentLoader, float scale) {
 		internal static SkeletonData ReadSkeletonData (string text, AttachmentLoader attachmentLoader, float scale) {
-			var input = new StringReader(text);
-			var json = new SkeletonJson(attachmentLoader) {
+			StringReader input = new StringReader(text);
+			SkeletonJson json = new SkeletonJson(attachmentLoader) {
 				Scale = scale
 				Scale = scale
 			};
 			};
 			return json.ReadSkeletonData(input);
 			return json.ReadSkeletonData(input);

+ 5 - 5
spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataCompatibility.cs

@@ -106,7 +106,7 @@ namespace Spine.Unity {
 
 
 			if (fileVersion.sourceType == SourceType.Binary) {
 			if (fileVersion.sourceType == SourceType.Binary) {
 				try {
 				try {
-					using (var memStream = new MemoryStream(asset.bytes)) {
+					using (MemoryStream memStream = new MemoryStream(asset.bytes)) {
 						fileVersion.rawVersion = SkeletonBinary.GetVersionString(memStream);
 						fileVersion.rawVersion = SkeletonBinary.GetVersionString(memStream);
 					}
 					}
 				} catch (System.Exception e) {
 				} catch (System.Exception e) {
@@ -126,7 +126,7 @@ namespace Spine.Unity {
 						return null;
 						return null;
 					}
 					}
 
 
-					var root = obj as Dictionary<string, object>;
+					Dictionary<string, object> root = obj as Dictionary<string, object>;
 					if (root == null) {
 					if (root == null) {
 						problemDescription = string.Format("'{0}' is not compatible JSON. Parser returned an incorrect type while parsing version info.", asset.name);
 						problemDescription = string.Format("'{0}' is not compatible JSON. Parser returned an incorrect type while parsing version info.", asset.name);
 						isSpineSkeletonData = false;
 						isSpineSkeletonData = false;
@@ -134,7 +134,7 @@ namespace Spine.Unity {
 					}
 					}
 
 
 					if (root.ContainsKey("skeleton")) {
 					if (root.ContainsKey("skeleton")) {
-						var skeletonInfo = (Dictionary<string, object>)root["skeleton"];
+						Dictionary<string, object> skeletonInfo = (Dictionary<string, object>)root["skeleton"];
 						object jv;
 						object jv;
 						skeletonInfo.TryGetValue("spine", out jv);
 						skeletonInfo.TryGetValue("spine", out jv);
 						fileVersion.rawVersion = jv as string;
 						fileVersion.rawVersion = jv as string;
@@ -148,7 +148,7 @@ namespace Spine.Unity {
 				return null;
 				return null;
 			}
 			}
 
 
-			var versionSplit = fileVersion.rawVersion.Split('.');
+			string[] versionSplit = fileVersion.rawVersion.Split('.');
 			try {
 			try {
 				fileVersion.version = new[]{ int.Parse(versionSplit[0], CultureInfo.InvariantCulture),
 				fileVersion.version = new[]{ int.Parse(versionSplit[0], CultureInfo.InvariantCulture),
 									int.Parse(versionSplit[1], CultureInfo.InvariantCulture) };
 									int.Parse(versionSplit[1], CultureInfo.InvariantCulture) };
@@ -194,7 +194,7 @@ namespace Spine.Unity {
 			info.compatibleVersions = (fileVersion.sourceType == SourceType.Binary) ? compatibleBinaryVersions
 			info.compatibleVersions = (fileVersion.sourceType == SourceType.Binary) ? compatibleBinaryVersions
 				: compatibleJsonVersions;
 				: compatibleJsonVersions;
 
 
-			foreach (var compatibleVersion in info.compatibleVersions) {
+			foreach (int[] compatibleVersion in info.compatibleVersions) {
 				bool majorMatch = fileVersion.version[0] == compatibleVersion[0];
 				bool majorMatch = fileVersion.version[0] == compatibleVersion[0];
 				bool minorMatch = fileVersion.version[1] == compatibleVersion[1];
 				bool minorMatch = fileVersion.version[1] == compatibleVersion[1];
 				if (majorMatch && minorMatch) {
 				if (majorMatch && minorMatch) {

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно