浏览代码

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

Harald Csaszar 2 年之前
父节点
当前提交
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];
 			int currentId = 0;
 			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)
 					propertyIds[currentId++] = ids[i];
 			}
@@ -115,7 +115,7 @@ namespace Spine {
 				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++)
 				timelines[i].Apply(skeleton, lastTime, time, events, alpha, blend, direction);
 		}
@@ -1173,7 +1173,7 @@ namespace Spine {
 
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
-				var setup = slot.data;
+				SlotData setup = slot.data;
 				switch (blend) {
 				case MixBlend.Setup:
 					slot.r = setup.r;
@@ -1289,7 +1289,7 @@ namespace Spine {
 
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
-				var setup = slot.data;
+				SlotData setup = slot.data;
 				switch (blend) {
 				case MixBlend.Setup:
 					slot.r = setup.r;
@@ -1338,7 +1338,7 @@ namespace Spine {
 			} else {
 				float br, bg, bb;
 				if (blend == MixBlend.Setup) {
-					var setup = slot.data;
+					SlotData setup = slot.data;
 					br = setup.r;
 					bg = setup.g;
 					bb = setup.b;
@@ -1377,7 +1377,7 @@ namespace Spine {
 
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
-				var setup = slot.data;
+				SlotData setup = slot.data;
 				switch (blend) {
 				case MixBlend.Setup:
 					slot.a = setup.a;
@@ -1869,10 +1869,10 @@ namespace Spine {
 
 			Slot slot = skeleton.slots.Items[slotIndex];
 			if (!slot.bone.active) return;
-			var vertexAttachment = slot.attachment as VertexAttachment;
+			VertexAttachment vertexAttachment = slot.attachment as VertexAttachment;
 			if (vertexAttachment == null || vertexAttachment.TimelineAttachment != attachment) return;
 
-			var deformArray = slot.deform;
+			ExposedList<float> deformArray = slot.deform;
 			if (deformArray.Count == 0) blend = MixBlend.Setup;
 
 			float[][] vertices = this.vertices;

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

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

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

@@ -63,10 +63,10 @@ namespace Spine {
 
 #if !(IS_UNITY)
 #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 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 {
 					Atlas atlas = new Atlas(reader, Path.GetDirectoryName(path), textureLoader);
 					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();
 		}
 #else
@@ -120,7 +120,7 @@ namespace Spine {
 			AtlasPage page = null;
 			AtlasRegion region = null;
 
-			var pageFields = new Dictionary<string, Action>(5);
+			Dictionary<string, Action> pageFields = new Dictionary<string, Action>(5);
 			pageFields.Add("size", () => {
 				page.width = int.Parse(entry[1], CultureInfo.InvariantCulture);
 				page.height = int.Parse(entry[2], CultureInfo.InvariantCulture);
@@ -140,7 +140,7 @@ namespace Spine {
 				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.
 				region.x = int.Parse(entry[1], 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.v2 = (region.y + region.width) / (float)page.height;
 
-						var tempSwap = region.packedWidth;
+						int tempSwap = region.packedWidth;
 						region.packedWidth = region.packedHeight;
 						region.packedHeight = tempSwap;
 					} else {

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

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

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

@@ -82,7 +82,7 @@ namespace Spine {
 		public void Update () {
 			if (mix == 0) return;
 			Bone target = this.target;
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			switch (this.bones.Count) {
 			case 1:
 				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 {
 	public static class Json {
 		public static object Deserialize (TextReader text) {
-			var parser = new SharpJson.JsonDecoder();
+			SharpJson.JsonDecoder parser = new SharpJson.JsonDecoder();
 			parser.parseNumbersAsFloat = true;
 			return parser.Decode(text.ReadToEnd());
 		}
@@ -175,7 +175,7 @@ namespace SharpJson {
 					case 'u':
 						int remainingLength = json.Length - index;
 						if (remainingLength >= 4) {
-							var hex = new string(json, index, 4);
+							string hex = new string(json, index, 4);
 
 							// XXX: handle UTF
 							stringBuffer[idx++] = (char)Convert.ToInt32(hex, 16);
@@ -217,7 +217,7 @@ namespace SharpJson {
 			int lastIndex = GetLastIndexOfNumber(index);
 			int charLength = (lastIndex - index) + 1;
 
-			var result = new string(json, index, charLength);
+			string result = new string(json, index, charLength);
 
 			index = lastIndex + 1;
 
@@ -226,7 +226,7 @@ namespace SharpJson {
 
 		public float ParseFloatNumber () {
 			float number;
-			var str = GetNumberString();
+			string str = GetNumberString();
 
 			if (!float.TryParse(str, NumberStyles.Float, CultureInfo.InvariantCulture, out number))
 				return 0;
@@ -236,7 +236,7 @@ namespace SharpJson {
 
 		public double ParseDoubleNumber () {
 			double number;
-			var str = GetNumberString();
+			string str = GetNumberString();
 
 			if (!double.TryParse(str, NumberStyles.Any, CultureInfo.InvariantCulture, out number))
 				return 0;
@@ -387,18 +387,18 @@ namespace SharpJson {
 		}
 
 		public static object DecodeText (string text) {
-			var builder = new JsonDecoder();
+			JsonDecoder builder = new JsonDecoder();
 			return builder.Decode(text);
 		}
 
 		IDictionary<string, object> ParseObject () {
-			var table = new Dictionary<string, object>();
+			Dictionary<string, object> table = new Dictionary<string, object>();
 
 			// {
 			lexer.NextToken();
 
 			while (true) {
-				var token = lexer.LookAhead();
+				Lexer.Token token = lexer.LookAhead();
 
 				switch (token) {
 				case Lexer.Token.None:
@@ -440,13 +440,13 @@ namespace SharpJson {
 		}
 
 		IList<object> ParseArray () {
-			var array = new List<object>();
+			List<object> array = new List<object>();
 
 			// [
 			lexer.NextToken();
 
 			while (true) {
-				var token = lexer.LookAhead();
+				Lexer.Token token = lexer.LookAhead();
 
 				switch (token) {
 				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
 		/// constraints, or weighted path attachments are added or removed.</summary>
 		public void UpdateCache () {
-			var updateCache = this.updateCache;
+			ExposedList<IUpdatable> updateCache = this.updateCache;
 			updateCache.Clear();
 
 			int boneCount = this.bones.Count;
@@ -190,7 +190,7 @@ namespace Spine {
 			if (skin != null) {
 				BoneData[] skinBones = skin.bones.Items;
 				for (int i = 0, n = skin.bones.Count; i < n; i++) {
-					var bone = bones[skinBones[i].index];
+					Bone bone = bones[skinBones[i].index];
 					do {
 						bone.sorted = false;
 						bone.active = true;
@@ -241,7 +241,7 @@ namespace Spine {
 			Bone target = constraint.target;
 			SortBone(target);
 
-			var constrained = constraint.bones;
+			ExposedList<Bone> constrained = constraint.bones;
 			Bone parent = constrained.Items[0];
 			SortBone(parent);
 
@@ -266,7 +266,7 @@ namespace Spine {
 
 			SortBone(constraint.target);
 
-			var constrained = constraint.bones.Items;
+			Bone[] constrained = constraint.bones.Items;
 			int boneCount = constraint.bones.Count;
 			if (constraint.data.local) {
 				for (int i = 0; i < boneCount; i++) {
@@ -302,7 +302,7 @@ namespace Spine {
 			Attachment attachment = slot.attachment;
 			if (attachment is PathAttachment) SortPathConstraintAttachment(attachment, slotBone);
 
-			var constrained = constraint.bones.Items;
+			Bone[] constrained = constraint.bones.Items;
 			int boneCount = constraint.bones.Count;
 			for (int i = 0; i < boneCount; i++)
 				SortBone(constrained[i]);
@@ -316,7 +316,7 @@ namespace Spine {
 		}
 
 		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);
 		}
 
@@ -326,7 +326,7 @@ namespace Spine {
 			if (pathBones == null)
 				SortBone(slotBone);
 			else {
-				var bones = this.bones.Items;
+				Bone[] bones = this.bones.Items;
 				for (int i = 0, n = pathBones.Length; i < n;) {
 					int nn = pathBones[i++];
 					nn += i;
@@ -373,7 +373,7 @@ namespace Spine {
 				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++)
 				updateCache[i].Update();
 		}
@@ -402,9 +402,9 @@ namespace Spine {
 			rootBone.d = (pc * lb + pd * ld) * scaleY;
 
 			// 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++) {
-				var updatable = updateCache[i];
+				IUpdatable updatable = updateCache[i];
 				if (updatable != rootBone) updatable.Update();
 			}
 		}
@@ -417,7 +417,7 @@ namespace Spine {
 
 		/// <summary>Sets the bones and constraints to their setup pose values.</summary>
 		public void SetBonesToSetupPose () {
-			var bones = this.bones.Items;
+			Bone[] bones = this.bones.Items;
 			for (int i = 0, n = this.bones.Count; i < n; i++)
 				bones[i].SetToSetupPose();
 
@@ -457,7 +457,7 @@ namespace Spine {
 		}
 
 		public void SetSlotsToSetupPose () {
-			var slots = this.slots.Items;
+			Slot[] slots = this.slots.Items;
 			int n = this.slots.Count;
 			Array.Copy(slots, 0, drawOrder.Items, 0, n);
 			for (int i = 0; i < n; i++)
@@ -469,7 +469,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public Bone FindBone (string boneName) {
 			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++) {
 				Bone bone = bones[i];
 				if (bone.data.name == boneName) return bone;
@@ -482,7 +482,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public Slot FindSlot (string slotName) {
 			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++) {
 				Slot slot = slots[i];
 				if (slot.data.name == slotName) return slot;
@@ -573,7 +573,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public IkConstraint FindIkConstraint (string constraintName) {
 			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++) {
 				IkConstraint ikConstraint = ikConstraints[i];
 				if (ikConstraint.data.name == constraintName) return ikConstraint;
@@ -586,7 +586,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public TransformConstraint FindTransformConstraint (string constraintName) {
 			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++) {
 				TransformConstraint transformConstraint = transformConstraints[i];
 				if (transformConstraint.data.Name == constraintName) return transformConstraint;
@@ -599,7 +599,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public PathConstraint FindPathConstraint (string constraintName) {
 			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++) {
 				PathConstraint constraint = pathConstraints[i];
 				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) {
 			float[] temp = vertexBuffer;
 			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;
 			for (int i = 0, n = this.drawOrder.Count; i < n; i++) {
 				Slot slot = drawOrder[i];
@@ -631,9 +631,8 @@ namespace Spine {
 					if (vertices.Length < 8) vertices = temp = new float[8];
 					region.ComputeWorldVertices(slot, temp, 0, 2);
 				} else {
-					var meshAttachment = attachment as MeshAttachment;
-					if (meshAttachment != null) {
-						MeshAttachment mesh = meshAttachment;
+					MeshAttachment mesh = attachment as MeshAttachment;
+					if (mesh != null) {
 						verticesLength = mesh.WorldVerticesLength;
 						vertices = temp;
 						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
 		private async Task<SkeletonData> ReadFile(string path) {
 			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.Name = Path.GetFileNameWithoutExtension(path);
 				return skeletonData;
@@ -96,9 +96,9 @@ namespace Spine {
 #else
 		public override SkeletonData ReadSkeletonData (string path) {
 #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
-			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
 				SkeletonData skeletonData = ReadSkeletonData(input);
 				skeletonData.name = Path.GetFileNameWithoutExtension(path);
@@ -127,7 +127,7 @@ namespace Spine {
 			if (file == null) throw new ArgumentNullException("file");
 			float scale = this.scale;
 
-			var skeletonData = new SkeletonData();
+			SkeletonData skeletonData = new SkeletonData();
 			SkeletonInput input = new SkeletonInput(file);
 
 			long hash = input.ReadLong();
@@ -162,7 +162,7 @@ namespace Spine {
 				o[i] = input.ReadString();
 
 			// 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++) {
 				String name = input.ReadString();
 				BoneData parent = i == 0 ? null : bones[input.ReadInt(true)];
@@ -182,7 +182,7 @@ namespace Spine {
 			}
 
 			// 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++) {
 				String slotName = input.ReadString();
 				BoneData boneData = bones[input.ReadInt(true)];
@@ -212,7 +212,7 @@ namespace Spine {
 				IkConstraintData data = new IkConstraintData(input.ReadString());
 				data.order = input.ReadInt(true);
 				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++)
 					constraintBones[ii] = bones[input.ReadInt(true)];
 				data.target = bones[input.ReadInt(true)];
@@ -231,7 +231,7 @@ namespace Spine {
 				TransformConstraintData data = new TransformConstraintData(input.ReadString());
 				data.order = input.ReadInt(true);
 				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++)
 					constraintBones[ii] = bones[input.ReadInt(true)];
 				data.target = bones[input.ReadInt(true)];
@@ -341,17 +341,17 @@ namespace Spine {
 			} else {
 				skin = new Skin(input.ReadStringRef());
 				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++)
 					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++)
 					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++)
 					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++)
 					skin.constraints.Add(pathConstraintsItems[input.ReadInt(true)]);
 				skin.constraints.TrimExcess();
@@ -561,8 +561,8 @@ namespace Spine {
 				vertices.vertices = ReadFloatArray(input, verticesLength, scale);
 				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++) {
 				int boneCount = input.ReadInt(true);
 				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="IOException">Throws IOException when a read operation fails.</exception>
 		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;
 
 			// Slot timelines.
@@ -1049,7 +1049,7 @@ namespace Spine {
 			}
 
 			float duration = 0;
-			var items = timelines.Items;
+			Timeline[] items = timelines.Items;
 			for (int i = 0, n = timelines.Count; i < n; i++)
 				duration = Math.Max(duration, items[i].Duration);
 			return new Animation(name, timelines, duration);
@@ -1221,10 +1221,10 @@ namespace Spine {
 			public string GetVersionString () {
 				try {
 					// try reading 4.0+ format
-					var initialPosition = input.Position;
+					long initialPosition = input.Position;
 					ReadLong(); // long hash
 
-					var stringPosition = input.Position;
+					long stringPosition = input.Position;
 					int stringByteCount = ReadInt(true);
 					input.Position = stringPosition;
 					if (stringByteCount <= 13) {
@@ -1250,7 +1250,7 @@ namespace Spine {
 				byteCount = ReadInt(true);
 				if (byteCount > 1 && byteCount <= 13) {
 					byteCount--;
-					var buffer = new byte[byteCount];
+					byte[] buffer = new byte[byteCount];
 					ReadFully(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);
 			MakeClockwise(clippingPolygon);
 			clippingPolygons = triangulator.Decompose(clippingPolygon, triangulator.Triangulate(clippingPolygon));
-			foreach (var polygon in clippingPolygons) {
+			foreach (ExposedList<float> polygon in clippingPolygons) {
 				MakeClockwise(polygon);
 				polygon.Add(polygon.Items[0]);
 				polygon.Add(polygon.Items[1]);
@@ -80,8 +80,8 @@ namespace Spine {
 
 		public void ClipTriangles (float[] vertices, int verticesLength, int[] triangles, int trianglesLength, float[] uvs) {
 			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 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
 		 * 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) {
-			var originalOutput = output;
-			var clipped = false;
+			ExposedList<float> originalOutput = output;
+			bool clipped = false;
 
 			// Avoid copy at the end.
 			ExposedList<float> input = null;
@@ -249,7 +249,7 @@ namespace Spine {
 				output.Add(output.Items[1]);
 
 				if (i == clippingVerticesLast) break;
-				var temp = output;
+				ExposedList<float> temp = output;
 				output = input;
 				output.Clear();
 				input = temp;

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

@@ -103,7 +103,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public BoneData FindBone (string boneName) {
 			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++) {
 				BoneData bone = bones[i];
 				if (bone.name == boneName) return bone;
@@ -116,7 +116,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public SlotData FindSlot (string slotName) {
 			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++) {
 				SlotData slot = slots[i];
 				if (slot.name == slotName) return slot;
@@ -149,7 +149,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public Animation FindAnimation (string animationName) {
 			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++) {
 				Animation animation = animations[i];
 				if (animation.name == animationName) return animation;
@@ -162,7 +162,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public IkConstraintData FindIkConstraint (string constraintName) {
 			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++) {
 				IkConstraintData ikConstraint = ikConstraints[i];
 				if (ikConstraint.name == constraintName) return ikConstraint;
@@ -175,7 +175,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public TransformConstraintData FindTransformConstraint (string constraintName) {
 			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++) {
 				TransformConstraintData transformConstraint = transformConstraints[i];
 				if (transformConstraint.name == constraintName) return transformConstraint;
@@ -192,7 +192,7 @@ namespace Spine {
 		/// <returns>May be null.</returns>
 		public PathConstraintData FindPathConstraint (string constraintName) {
 			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++) {
 				PathConstraintData constraint = pathConstraints[i];
 				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) {
 			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
 			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.Name = Path.GetFileNameWithoutExtension(path);
 				return skeletonData;
@@ -78,9 +78,9 @@ namespace Spine {
 #else
 		public override SkeletonData ReadSkeletonData (string path) {
 #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
-			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
 				SkeletonData skeletonData = ReadSkeletonData(reader);
 				skeletonData.name = Path.GetFileNameWithoutExtension(path);
@@ -93,14 +93,14 @@ namespace Spine {
 			if (reader == null) throw new ArgumentNullException("reader", "reader cannot be null.");
 
 			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.");
 
 			// 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.version = (string)skeletonMap["spine"];
 				skeletonData.x = GetFloat(skeletonMap, "x", 0);
@@ -121,7 +121,7 @@ namespace Spine {
 						if (parent == null)
 							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.x = GetFloat(boneMap, "x", 0) * scale;
 					data.y = GetFloat(boneMap, "y", 0) * scale;
@@ -142,11 +142,11 @@ namespace Spine {
 			// Slots.
 			if (root.ContainsKey("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);
 					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")) {
 						string color = (string)slotMap["color"];
@@ -157,7 +157,7 @@ namespace Spine {
 					}
 
 					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.g2 = ToColor(color2, 1, 6);
 						data.b2 = ToColor(color2, 2, 6);
@@ -345,8 +345,8 @@ namespace Spine {
 			// Events.
 			if (root.ContainsKey("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.Float = GetFloat(entryMap, "float", 0);
 					data.String = GetString(entryMap, "string", string.Empty);
@@ -383,8 +383,8 @@ namespace Spine {
 			float scale = this.scale;
 			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) {
 			case AttachmentType.Region: {
@@ -405,7 +405,7 @@ namespace Spine {
 				region.sequence = sequence;
 
 				if (map.ContainsKey("color")) {
-					var color = (string)map["color"];
+					string color = (string)map["color"];
 					region.r = ToColor(color, 0);
 					region.g = ToColor(color, 1);
 					region.b = ToColor(color, 2);
@@ -431,7 +431,7 @@ namespace Spine {
 				mesh.Path = path;
 
 				if (map.ContainsKey("color")) {
-					var color = (string)map["color"];
+					string color = (string)map["color"];
 					mesh.r = ToColor(color, 0);
 					mesh.g = ToColor(color, 1);
 					mesh.b = ToColor(color, 2);
@@ -504,7 +504,7 @@ namespace Spine {
 		}
 
 		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;
 			Sequence sequence = new Sequence(GetInt(map, "count"));
 			sequence.start = GetInt(map, "start", 1);
@@ -550,22 +550,22 @@ namespace Spine {
 		}
 
 		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.
 			if (map.ContainsKey("slots")) {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)map["slots"]) {
 					string slotName = entry.Key;
 					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) {
-						var values = (List<Object>)timelineEntry.Value;
+						List<object> values = (List<Object>)timelineEntry.Value;
 						int frames = values.Count;
 						if (frames == 0) continue;
-						var timelineName = (string)timelineEntry.Key;
+						string timelineName = (string)timelineEntry.Key;
 						if (timelineName == "attachment") {
-							var timeline = new AttachmentTimeline(frames, slotIndex);
+							AttachmentTimeline timeline = new AttachmentTimeline(frames, slotIndex);
 							int frame = 0;
 							foreach (Dictionary<string, Object> keyMap in values) {
 								timeline.SetFrame(frame++, GetFloat(keyMap, "time", 0), GetString(keyMap, "name", null));
@@ -573,11 +573,11 @@ namespace Spine {
 							timelines.Add(timeline);
 
 						} 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();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["color"];
 							float r = ToColor(color, 0);
@@ -590,7 +590,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									break;
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["color"];
@@ -616,11 +616,11 @@ namespace Spine {
 							timelines.Add(timeline);
 
 						} 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();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["color"];
 							float r = ToColor(color, 0, 6);
@@ -632,7 +632,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									break;
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["color"];
@@ -655,16 +655,16 @@ namespace Spine {
 							timelines.Add(timeline);
 
 						} else if (timelineName == "alpha") {
-							var keyMapEnumerator = values.GetEnumerator();
+							List<object>.Enumerator keyMapEnumerator = values.GetEnumerator();
 							keyMapEnumerator.MoveNext();
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, new AlphaTimeline(frames, frames, slotIndex), 0, 1));
 
 						} 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();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["light"];
 							float r = ToColor(color, 0);
@@ -681,7 +681,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									break;
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["light"];
@@ -717,11 +717,11 @@ namespace Spine {
 							timelines.Add(timeline);
 
 						} 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();
-							var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+							Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 							float time = GetFloat(keyMap, "time", 0);
 							string color = (string)keyMap["light"];
 							float r = ToColor(color, 0, 6);
@@ -737,7 +737,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									break;
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 
 								float time2 = GetFloat(nextMap, "time", 0);
 								color = (string)nextMap["light"];
@@ -780,7 +780,7 @@ namespace Spine {
 				foreach (KeyValuePair<string, Object> entry in (Dictionary<string, Object>)map["bones"]) {
 					string boneName = entry.Key;
 					int boneIndex = -1;
-					var bones = skeletonData.bones.Items;
+					BoneData[] bones = skeletonData.bones.Items;
 					for (int i = 0, n = skeletonData.bones.Count; i < n; i++) {
 						if (bones[i].name == boneName) {
 							boneIndex = i;
@@ -788,13 +788,13 @@ namespace Spine {
 						}
 					}
 					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) {
-						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;
 						int frames = values.Count;
-						var timelineName = (string)timelineEntry.Key;
+						string timelineName = (string)timelineEntry.Key;
 						if (timelineName == "rotate")
 							timelines.Add(ReadTimeline(ref keyMapEnumerator, new RotateTimeline(frames, frames, boneIndex), 0, 1));
 						else if (timelineName == "translate") {
@@ -829,10 +829,10 @@ namespace Spine {
 			// IK constraint timelines.
 			if (map.ContainsKey("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;
-					var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+					Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 					IkConstraintData constraint = skeletonData.FindIkConstraint(timelineMap.Key);
 					IkConstraintTimeline timeline = new IkConstraintTimeline(values.Count, values.Count << 1,
 						skeletonData.IkConstraints.IndexOf(constraint));
@@ -845,7 +845,7 @@ namespace Spine {
 							timeline.Shrink(bezier);
 							break;
 						}
-						var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+						Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 						float time2 = GetFloat(nextMap, "time", 0);
 						float mix2 = GetFloat(nextMap, "mix", 1), softness2 = GetFloat(nextMap, "softness", 0) * scale;
 						if (keyMap.ContainsKey("curve")) {
@@ -865,10 +865,10 @@ namespace Spine {
 			// Transform constraint timelines.
 			if (map.ContainsKey("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;
-					var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+					Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 					TransformConstraintData constraint = skeletonData.FindTransformConstraint(timelineMap.Key);
 					TransformConstraintTimeline timeline = new TransformConstraintTimeline(values.Count, values.Count * 6,
 						skeletonData.TransformConstraints.IndexOf(constraint));
@@ -882,7 +882,7 @@ namespace Spine {
 							timeline.Shrink(bezier);
 							break;
 						}
-						var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+						Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 						float time2 = GetFloat(nextMap, "time", 0);
 						float mixRotate2 = GetFloat(nextMap, "mixRotate", 1), mixShearY2 = GetFloat(nextMap, "mixShearY", 1);
 						float mixX2 = GetFloat(nextMap, "mixX", 1), mixY2 = GetFloat(nextMap, "mixY", mixX2);
@@ -915,14 +915,14 @@ namespace Spine {
 					PathConstraintData constraint = skeletonData.FindPathConstraint(constraintMap.Key);
 					if (constraint == null) throw new Exception("Path constraint not found: " + constraintMap.Key);
 					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) {
-						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;
 
 						int frames = values.Count;
-						var timelineName = (string)timelineEntry.Key;
+						string timelineName = (string)timelineEntry.Key;
 						if (timelineName == "position") {
 							CurveTimeline1 timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);
 							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));
 						} else if (timelineName == "mix") {
 							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 mixRotate = GetFloat(keyMap, "mixRotate", 1);
 							float mixX = GetFloat(keyMap, "mixX", 1), mixY = GetFloat(keyMap, "mixY", mixX);
@@ -942,7 +942,7 @@ namespace Spine {
 									timeline.Shrink(bezier);
 									break;
 								}
-								var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 								float time2 = GetFloat(nextMap, "time", 0);
 								float mixRotate2 = GetFloat(nextMap, "mixRotate", 1);
 								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);
 							if (attachment == null) throw new Exception("Timeline attachment not found: " + attachmentMap.Key);
 							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;
-								var keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+								Dictionary<string, object> keyMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 								int frames = values.Count;
 								string timelineName = timelineMap.Key;
 								if (timelineName == "deform") {
@@ -1014,7 +1014,7 @@ namespace Spine {
 											timeline.Shrink(bezier);
 											break;
 										}
-										var nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
+										Dictionary<string, object> nextMap = (Dictionary<string, Object>)keyMapEnumerator.Current;
 										float time2 = GetFloat(nextMap, "time", 0);
 										if (keyMap.ContainsKey("curve")) {
 											object curve = keyMap["curve"];
@@ -1047,8 +1047,8 @@ namespace Spine {
 
 			// Draw order timeline.
 			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 frame = 0;
 				foreach (Dictionary<string, Object> drawOrderMap in values) {
@@ -1057,7 +1057,7 @@ namespace Spine {
 						drawOrder = new int[slotCount];
 						for (int i = slotCount - 1; i >= 0; i--)
 							drawOrder[i] = -1;
-						var offsets = (List<Object>)drawOrderMap["offsets"];
+						List<object> offsets = (List<Object>)drawOrderMap["offsets"];
 						int[] unchanged = new int[slotCount - offsets.Count];
 						int originalIndex = 0, unchangedIndex = 0;
 						foreach (Dictionary<string, Object> offsetMap in offsets) {
@@ -1084,13 +1084,13 @@ namespace Spine {
 
 			// Event timeline.
 			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;
 				foreach (Dictionary<string, Object> eventMap in eventsMap) {
 					EventData eventData = skeletonData.FindEvent((string)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),
 						floatValue = GetFloat(eventMap, "float", eventData.Float),
 						stringValue = GetString(eventMap, "string", eventData.String)
@@ -1106,14 +1106,14 @@ namespace Spine {
 			}
 			timelines.TrimExcess();
 			float duration = 0;
-			var items = timelines.Items;
+			Timeline[] items = timelines.Items;
 			for (int i = 0, n = timelines.Count; i < n; i++)
 				duration = Math.Max(duration, items[i].Duration);
 			skeletonData.animations.Add(new Animation(name, timelines, duration));
 		}
 
 		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 value = GetFloat(keyMap, "value", defaultValue) * scale;
 			for (int frame = 0, bezier = 0; ; frame++) {
@@ -1122,7 +1122,7 @@ namespace Spine {
 					timeline.Shrink(bezier);
 					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 value2 = GetFloat(nextMap, "value", defaultValue) * scale;
 				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,
 			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 value1 = GetFloat(keyMap, name1, defaultValue) * scale, value2 = GetFloat(keyMap, name2, defaultValue) * scale;
 			for (int frame = 0, bezier = 0; ; frame++) {
@@ -1147,7 +1147,7 @@ namespace Spine {
 					timeline.Shrink(bezier);
 					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 nvalue1 = GetFloat(nextMap, name1, defaultValue) * scale, nvalue2 = GetFloat(nextMap, name2, defaultValue) * scale;
 				if (keyMap.ContainsKey("curve")) {
@@ -1170,7 +1170,7 @@ namespace Spine {
 				if (curveString == "stepped") timeline.SetStepped(frame);
 				return bezier;
 			}
-			var curveValues = (List<object>)curve;
+			List<object> curveValues = (List<object>)curve;
 			int i = value << 2;
 			float cx1 = (float)curveValues[i];
 			float cy1 = (float)curveValues[i + 1] * scale;
@@ -1186,8 +1186,8 @@ namespace Spine {
 		}
 
 		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) {
 				for (int i = 0, n = list.Count; i < n; i++)
 					values[i] = (float)list[i];
@@ -1199,8 +1199,8 @@ namespace Spine {
 		}
 
 		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++)
 				values[i] = (int)(float)list[i];
 			return values;

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

@@ -70,7 +70,7 @@ namespace Spine {
 			foreach (ConstraintData data in skin.constraints)
 				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;
 				SetAttachment(entry.slotIndex, entry.name, entry.attachment);
 			}
@@ -84,7 +84,7 @@ namespace Spine {
 			foreach (ConstraintData data in skin.constraints)
 				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;
 				if (entry.attachment is MeshAttachment) {
 					SetAttachment(entry.slotIndex, entry.name,
@@ -112,7 +112,7 @@ namespace Spine {
 		public void GetAttachments (int slotIndex, List<SkinEntry> attachments) {
 			if (slotIndex < 0) throw new ArgumentException("slotIndex must be >= 0.");
 			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;
 				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>
 		internal void AttachAll (Skeleton skeleton, Skin oldSkin) {
 			Slot[] slots = skeleton.slots.Items;
-			foreach (var item in oldSkin.attachments) {
+			foreach (KeyValuePair<SkinKey, SkinEntry> item in oldSkin.attachments) {
 				SkinEntry entry = item.Value;
 				int slotIndex = entry.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 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++) {
 				Bone bone = bones[i];
 
@@ -171,7 +171,7 @@ namespace Spine {
 			float degRadReflect = ta * td - tb * tc > 0 ? MathUtils.DegRad : -MathUtils.DegRad;
 			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++) {
 				Bone bone = bones[i];
 
@@ -231,7 +231,7 @@ namespace Spine {
 
 			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++) {
 				Bone bone = bones[i];
 
@@ -269,7 +269,7 @@ namespace Spine {
 
 			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++) {
 				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>>();
 
 		public ExposedList<int> Triangulate (ExposedList<float> verticesArray) {
-			var vertices = verticesArray.Items;
+			float[] vertices = verticesArray.Items;
 			int vertexCount = verticesArray.Count >> 1;
 
-			var indicesArray = this.indicesArray;
+			ExposedList<int> indicesArray = this.indicesArray;
 			indicesArray.Clear();
 			int[] indices = indicesArray.Resize(vertexCount).Items;
 			for (int i = 0; i < vertexCount; i++)
 				indices[i] = i;
 
-			var isConcaveArray = this.isConcaveArray;
+			ExposedList<bool> isConcaveArray = this.isConcaveArray;
 			bool[] isConcave = isConcaveArray.Resize(vertexCount).Items;
 			for (int i = 0, n = vertexCount; i < n; ++i)
 				isConcave[i] = IsConcave(i, vertexCount, vertices, indices);
 
-			var triangles = this.triangles;
+			ExposedList<int> triangles = this.triangles;
 			triangles.Clear();
 			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) {
-			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++)
 				polygonPool.Free(convexPolygons.Items[i]);
 			convexPolygons.Clear();
 
-			var convexPolygonsIndices = this.convexPolygonsIndices;
+			ExposedList<ExposedList<int>> convexPolygonsIndices = this.convexPolygonsIndices;
 			for (int i = 0, n = convexPolygonsIndices.Count; i < n; i++)
 				polygonIndicesPool.Free(convexPolygonsIndices.Items[i]);
 			convexPolygonsIndices.Clear();
 
-			var polygonIndices = polygonIndicesPool.Obtain();
+			ExposedList<int> polygonIndices = polygonIndicesPool.Obtain();
 			polygonIndices.Clear();
 
-			var polygon = polygonPool.Obtain();
+			ExposedList<float> polygon = polygonPool.Obtain();
 			polygon.Clear();
 
 			// Merge subsequent triangles if they form a triangle fan.
@@ -149,7 +149,7 @@ namespace Spine {
 				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).
-				var merged = false;
+				bool merged = false;
 				if (fanBaseIndex == t1) {
 					int o = polygon.Count - 4;
 					float[] p = polygon.Items;
@@ -213,13 +213,13 @@ namespace Spine {
 
 				for (int ii = 0; ii < n; ii++) {
 					if (ii == i) continue;
-					var otherIndices = convexPolygonsIndices.Items[ii];
+					ExposedList<int> otherIndices = convexPolygonsIndices.Items[ii];
 					if (otherIndices.Count != 3) continue;
 					int otherFirstIndex = otherIndices.Items[0];
 					int otherSecondIndex = otherIndices.Items[1];
 					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];
 
 					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) //
 			);
 			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.TrackEnd = 1.0f;
 			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.
 			if (boundAnimationsText != null) {
-				var boundAnimationsStringBuilder = new StringBuilder();
+				StringBuilder boundAnimationsStringBuilder = new StringBuilder();
 				boundAnimationsStringBuilder.AppendLine("Animation Controls:");
 
 				for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
@@ -97,7 +97,7 @@ namespace Spine.Unity.Examples {
 						boundAnimationsStringBuilder.AppendLine();
 
 					boundAnimationsStringBuilder.AppendFormat("---- Track {0} ---- \n", trackIndex);
-					foreach (var ba in trackControls[trackIndex].controls) {
+					foreach (AnimationControl ba in trackControls[trackIndex].controls) {
 						string animationName = ba.animationName;
 						if (string.IsNullOrEmpty(animationName))
 							animationName = "SetEmptyAnimation";
@@ -120,13 +120,13 @@ namespace Spine.Unity.Examples {
 		}
 
 		void Update () {
-			var animationState = skeletonAnimation.AnimationState;
+			AnimationState animationState = skeletonAnimation.AnimationState;
 
 			// For each track
 			for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
 
 				// 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.
 					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;
 
 		IEnumerator Start () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>(); if (skeletonAnimation == null) yield break;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			if (skeletonAnimation == null) yield break;
 			while (true) {
 				skeletonAnimation.AnimationState.SetAnimation(SpineBlinkPlayer.BlinkTrack, blinkAnimation, false);
 				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.
 			{
-				var pos = transform.localPosition;
+				Vector3 pos = transform.localPosition;
 				const float jumpTime = 1.2f;
 				const float half = jumpTime * 0.5f;
 				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
-			var currentModelState = model.state;
+			SpineBeginnerBodyState currentModelState = model.state;
 
 			if (previousViewState != currentModelState) {
 				PlayNewStableAnimation();
@@ -85,7 +85,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		void PlayNewStableAnimation () {
-			var newModelState = model.state;
+			SpineBeginnerBodyState newModelState = model.state;
 			Animation nextAnimation;
 
 			// Add conditionals to not interrupt transient animations.
@@ -115,7 +115,7 @@ namespace Spine.Unity.Examples {
 
 		[ContextMenu("Check Tracks")]
 		void CheckTracks () {
-			var state = skeletonAnimation.AnimationState;
+			AnimationState state = skeletonAnimation.AnimationState;
 			Debug.Log(state.GetCurrent(0));
 			Debug.Log(state.GetCurrent(1));
 		}
@@ -123,13 +123,13 @@ namespace Spine.Unity.Examples {
 		#region Transient Actions
 		public void PlayShoot () {
 			// 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.MixDuration = 0f;
 			skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
 
 			// 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.MixDuration = 0f;
 			skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
@@ -142,7 +142,7 @@ namespace Spine.Unity.Examples {
 
 		public void StartPlayingAim () {
 			// 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.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 () {
-			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.y *= skeletonAnimation.Skeleton.ScaleY;
 			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 () {
 			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);
 			}
 		}

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

@@ -58,7 +58,7 @@ public class HurtFlashEffect : MonoBehaviour {
 		int fillPhase = Shader.PropertyToID(fillPhaseProperty);
 		int fillColor = Shader.PropertyToID(fillColorProperty);
 
-		var wait = new WaitForSeconds(interval);
+		WaitForSeconds wait = new WaitForSeconds(interval);
 
 		for (int i = 0; i < flashCount; i++) {
 			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 () {
 			// Initialize AnimationReferenceAssets
-			foreach (var entry in statesAndAnimations) {
+			foreach (StateNameToAnimationReference entry in statesAndAnimations) {
 				entry.animation.Initialize();
 			}
-			foreach (var entry in transitions) {
+			foreach (AnimationTransition entry in transitions) {
 				entry.from.Initialize();
 				entry.to.Initialize();
 				entry.transition.Initialize();
 			}
 
 			// 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);
 			//}
 		}
@@ -90,7 +90,7 @@ namespace Spine.Unity.Examples {
 
 		/// <summary>Plays an animation based on the hash of the state name.</summary>
 		public void PlayAnimationForState (int shortNameHash, int layerIndex) {
-			var foundAnimation = GetAnimationForState(shortNameHash);
+			Animation foundAnimation = GetAnimationForState(shortNameHash);
 			if (foundAnimation == null)
 				return;
 
@@ -104,7 +104,7 @@ namespace Spine.Unity.Examples {
 
 		/// <summary>Gets a Spine Animation based on the hash of the state name.</summary>
 		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;
 		}
 
@@ -129,10 +129,10 @@ namespace Spine.Unity.Examples {
 
 		/// <summary>Play a non-looping animation once then continue playing the state animation.</summary>
 		public void PlayOneShot (Spine.Animation oneShot, int layerIndex) {
-			var state = skeletonAnimation.AnimationState;
+			AnimationState state = skeletonAnimation.AnimationState;
 			state.SetAnimation(0, oneShot, false);
 
-			var transition = TryGetTransition(oneShot, TargetAnimation);
+			Animation transition = TryGetTransition(oneShot, TargetAnimation);
 			if (transition != null)
 				state.AddAnimation(0, transition, false, 0f);
 
@@ -140,7 +140,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		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) {
 					return transition.transition.Animation;
 				}
@@ -153,7 +153,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		Spine.Animation GetCurrentAnimation (int layerIndex) {
-			var currentTrackEntry = skeletonAnimation.AnimationState.GetCurrent(layerIndex);
+			TrackEntry currentTrackEntry = skeletonAnimation.AnimationState.GetCurrent(layerIndex);
 			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
 				// 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;
 
 						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.
-				var currentAnimationIDs = new HashSet<string>();
-				foreach (var animation in animations) {
+				HashSet<string> currentAnimationIDs = new HashSet<string>();
+				foreach (Animation animation in animations) {
 					currentAnimationIDs.Clear();
-					foreach (var timeline in animation.Timelines) {
+					foreach (Timeline timeline in animation.Timelines) {
 						if (timeline is EventTimeline) continue;
 						foreach (string propertyId in timeline.PropertyIds) {
 							currentAnimationIDs.Add(propertyId);
 						}
 					}
 
-					var animationTimelines = animation.Timelines;
+					ExposedList<Timeline> animationTimelines = animation.Timelines;
 					foreach (string propertyId in idsToMatch) {
 						if (!currentAnimationIDs.Contains(propertyId))
 							animationTimelines.Add(timelineDictionary[propertyId]);
@@ -134,52 +134,52 @@ namespace Spine.Unity.Examples {
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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()) {
 					t.SetFrame(0, 0, new float[t.Attachment.Vertices.Length]);
 				} else {
@@ -190,42 +190,42 @@ namespace Spine.Unity.Examples {
 			}
 
 			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.
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				return t;
 			}
 
 			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);
 				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 () {
 			MatchImage();
 
-			var button = GetComponent<Button>();
+			Button button = GetComponent<Button>();
 			button.onClick.AddListener(
 				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) {
-			var equipType = asset.equipType;
+			EquipType equipType = asset.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;
-			var attachment = GenerateAttachmentFromEquipAsset(asset, slotIndex, howToEquip.templateSkin, howToEquip.templateAttachment);
+			Attachment attachment = GenerateAttachmentFromEquipAsset(asset, slotIndex, howToEquip.templateSkin, howToEquip.templateAttachment);
 			target.Equip(slotIndex, howToEquip.templateAttachment, attachment);
 		}
 
@@ -77,8 +77,8 @@ namespace Spine.Unity.Examples {
 			cachedAttachments.TryGetValue(asset, out attachment);
 
 			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.GetRemappedClone(asset.sprite, sourceMaterial, premultiplyAlpha: this.applyPMA);
 				// 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");
 
 			// 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)
 				equipsSkin.AddSkin(templateSkin);
 
@@ -77,7 +77,7 @@ namespace Spine.Unity.Examples {
 				Destroy(runtimeMaterial);
 			if (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);
 			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;
 
 		void Start () {
-			var button = GetComponent<Button>();
+			Button button = GetComponent<Button>();
 			button.onClick.AddListener(
 				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 () {
 			// 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
 			if (runtimeMaterial)
 				Destroy(runtimeMaterial);
@@ -159,8 +159,8 @@ namespace Spine.Unity.Examples {
 		}
 
 		void UpdateCharacterSkin () {
-			var skeleton = skeletonAnimation.Skeleton;
-			var skeletonData = skeleton.Data;
+			Skeleton skeleton = skeletonAnimation.Skeleton;
+			SkeletonData skeletonData = skeleton.Data;
 			characterSkin = new Skin("character-base");
 			// Note that the result Skin returned by calls to skeletonData.FindSkin()
 			// 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) {
-			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(pantsSkin));
 			if (!string.IsNullOrEmpty(bagSkin)) combinedSkin.AddSkin(skeletonData.FindSkin(bagSkin));
@@ -182,8 +182,8 @@ namespace Spine.Unity.Examples {
 		}
 
 		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);
 			AddEquipmentSkinsTo(resultCombinedSkin);

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

@@ -64,7 +64,7 @@ namespace Spine.Unity.Examples {
 
 		void OnValidate () {
 			if (sourceMaterial == null) {
-				var skeletonAnimation = GetComponent<SkeletonAnimation>();
+				SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
 				if (skeletonAnimation != null)
 					sourceMaterial = skeletonAnimation.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial;
 			}
@@ -76,13 +76,13 @@ namespace Spine.Unity.Examples {
 		}
 
 		void Apply () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
-			var skeleton = skeletonAnimation.Skeleton;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			Skeleton skeleton = skeletonAnimation.Skeleton;
 
 			// 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.
 			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.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.
 			// 				call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
 			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(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 () {
 			if (sourceMaterial == null) {
-				var skeletonGraphic = GetComponent<SkeletonGraphic>();
+				SkeletonGraphic skeletonGraphic = GetComponent<SkeletonGraphic>();
 				if (skeletonGraphic != null)
 					sourceMaterial = skeletonGraphic.SkeletonDataAsset.atlasAssets[0].PrimaryMaterial;
 			}
@@ -76,15 +76,15 @@ namespace Spine.Unity.Examples {
 
 		[ContextMenu("Apply")]
 		void Apply () {
-			var skeletonGraphic = GetComponent<SkeletonGraphic>();
-			var skeleton = skeletonGraphic.Skeleton;
+			SkeletonGraphic skeletonGraphic = GetComponent<SkeletonGraphic>();
+			Skeleton skeleton = skeletonGraphic.Skeleton;
 
 			// 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.
 			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
-			var baseSkin = skeleton.Data.FindSkin(baseSkinName);
+			Skin baseSkin = skeleton.Data.FindSkin(baseSkinName);
 
 			// STEP 1: "EQUIP" ITEMS USING SPRITES
 			// 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.
 			// 				call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
 			if (repack) {
-				var repackedSkin = new Skin("repacked skin");
+				Skin repackedSkin = new Skin("repacked skin");
 				repackedSkin.AddSkin(skeleton.Data.DefaultSkin);
 				repackedSkin.AddSkin(customSkin);
 				// 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 () {
-			var rb = gameObject.AddComponent<Rigidbody2D>();
+			Rigidbody2D rb = gameObject.AddComponent<Rigidbody2D>();
 			rb.freezeRotation = 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;
 
 		void Start () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
 			if (skeletonComponent == null) return;
-			var skeleton = skeletonComponent.Skeleton;
+			Skeleton skeleton = skeletonComponent.Skeleton;
 			if (skeleton == null) return;
 
 			combinedSkin = combinedSkin ?? new Skin("combined");
 			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);
 			}
 
 			skeleton.SetSkin(combinedSkin);
 			skeleton.SetToSetupPose();
-			var animationStateComponent = skeletonComponent as IAnimationStateComponent;
+			IAnimationStateComponent animationStateComponent = skeletonComponent as IAnimationStateComponent;
 			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;
 				}
 
-				var skeletonAnimation = skeletonRenderer as Spine.Unity.IAnimationStateComponent;
+				IAnimationStateComponent skeletonAnimation = skeletonRenderer as Spine.Unity.IAnimationStateComponent;
 				if (skeletonAnimation != null)
 					skeletonAnimation.AnimationState.Event += OnEvent;
 			}
@@ -130,7 +130,7 @@ namespace Spine.Unity.Examples {
 
 				Material[] materials = meshRenderer.sharedMaterials;
 				for (int i = 0; i < materials.Length; i++) {
-					var originalMat = materials[i];
+					Material originalMat = materials[i];
 					Material ghostMat;
 					if (!materialTable.ContainsKey(originalMat)) {
 						ghostMat = new Material(originalMat) {
@@ -149,7 +149,7 @@ namespace Spine.Unity.Examples {
 					materials[i] = ghostMat;
 				}
 
-				var goTransform = go.transform;
+				Transform goTransform = go.transform;
 				goTransform.parent = transform;
 
 				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();
 			}
 
-			foreach (var mat in materialTable.Values)
+			foreach (Material mat in materialTable.Values)
 				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;
 
 		void Awake () {
-			var skeletonRenderer = GetComponent<SkeletonRenderer>();
+			SkeletonRenderer skeletonRenderer = GetComponent<SkeletonRenderer>();
 			skeletonRenderer.OnRebuild += Apply;
 			if (skeletonRenderer.valid) Apply(skeletonRenderer);
 		}
@@ -62,7 +62,7 @@ namespace Spine.Unity.Examples {
 			if (atlas == null) return;
 			float scale = skeletonRenderer.skeletonDataAsset.scale;
 
-			foreach (var entry in attachments) {
+			foreach (SlotRegionPair entry in attachments) {
 				Slot slot = skeletonRenderer.Skeleton.FindSlot(entry.slot);
 				Attachment originalAttachment = slot.Attachment;
 				AtlasRegion region = atlas.FindRegion(entry.region);
@@ -72,7 +72,7 @@ namespace Spine.Unity.Examples {
 				} else if (inheritProperties && originalAttachment != null) {
 					slot.Attachment = originalAttachment.GetRemappedClone(region, true, true, scale);
 				} else {
-					var newRegionAttachment = region.ToRegionAttachment(region.name, scale);
+					RegionAttachment newRegionAttachment = region.ToRegionAttachment(region.name, scale);
 					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
 		void OnValidate () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
-			var skeletonRenderer = skeletonComponent as SkeletonRenderer;
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
+			SkeletonRenderer skeletonRenderer = skeletonComponent as SkeletonRenderer;
 			bool applyPMA;
 
 			if (skeletonRenderer != null) {
 				applyPMA = skeletonRenderer.pmaVertexColors;
 			} else {
-				var skeletonGraphic = skeletonComponent as SkeletonGraphic;
+				SkeletonGraphic skeletonGraphic = skeletonComponent as SkeletonGraphic;
 				applyPMA = skeletonGraphic != null && skeletonGraphic.MeshGenerator.settings.pmaVertexColors;
 			}
 
@@ -82,7 +82,7 @@ namespace Spine.Unity.Examples {
 			AtlasPage atlasPage;
 			atlasPageCache.TryGetValue(texture, out atlasPage);
 			if (atlasPage == null) {
-				var newMaterial = new Material(shader);
+				Material newMaterial = new Material(shader);
 				atlasPage = newMaterial.ToSpineAtlasPage();
 				atlasPageCache[texture] = atlasPage;
 			}
@@ -105,19 +105,19 @@ namespace Spine.Unity.Examples {
 		public void Initialize (bool overwrite = true) {
 			if (overwrite || attachment == null) {
 				// 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)
 					this.applyPMA = skeletonRenderer.pmaVertexColors;
 				else {
-					var skeletonGraphic = skeletonComponent as SkeletonGraphic;
+					SkeletonGraphic skeletonGraphic = skeletonComponent as SkeletonGraphic;
 					if (skeletonGraphic != null)
 						this.applyPMA = skeletonGraphic.MeshGenerator.settings.pmaVertexColors;
 				}
 
 				// Subscribe to UpdateComplete to override animation keys.
 				if (overrideAnimation) {
-					var animatedSkeleton = skeletonComponent as ISkeletonAnimation;
+					ISkeletonAnimation animatedSkeleton = skeletonComponent as ISkeletonAnimation;
 					if (animatedSkeleton != null) {
 						animatedSkeleton.UpdateComplete -= AnimationOverrideSpriteAttach;
 						animatedSkeleton.UpdateComplete += AnimationOverrideSpriteAttach;
@@ -134,7 +134,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		void OnDestroy () {
-			var animatedSkeleton = GetComponent<ISkeletonAnimation>();
+			ISkeletonAnimation animatedSkeleton = GetComponent<ISkeletonAnimation>();
 			if (animatedSkeleton != null)
 				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) {
 			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;
 			if (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
 			if (skeletonGraphic != null && skeletonGraphic.skeletonDataAsset != null) {
-				var atlasAssets = skeletonGraphic.skeletonDataAsset.atlasAssets;
+				AtlasAssetBase[] atlasAssets = skeletonGraphic.skeletonDataAsset.atlasAssets;
 
 				if (atlasAssets.Length > 0 && 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;
 			}
 
-			var parentMaterials = referenceRenderer.sharedMaterials;
+			Material[] parentMaterials = referenceRenderer.sharedMaterials;
 			if (replacementMaterials.Length != parentMaterials.Length) {
 				replacementMaterials = new MaterialReplacement[parentMaterials.Length];
 			}
@@ -87,7 +87,7 @@ namespace Spine.Unity.Examples {
 			}
 
 			// subscribe to OnMeshAndMaterialsUpdated
-			var skeletonRenderer = referenceRenderer.GetComponent<SkeletonAnimation>();
+			SkeletonAnimation skeletonRenderer = referenceRenderer.GetComponent<SkeletonAnimation>();
 			if (skeletonRenderer) {
 				skeletonRenderer.OnMeshAndMaterialsUpdated -= UpdateOnCallback;
 				skeletonRenderer.OnMeshAndMaterialsUpdated += UpdateOnCallback;
@@ -128,12 +128,12 @@ namespace Spine.Unity.Examples {
 		void UpdateMaterials () {
 			ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;
 
-			var parentMaterials = referenceRenderer.sharedMaterials;
+			Material[] parentMaterials = referenceRenderer.sharedMaterials;
 			if (sharedMaterials.Length != parentMaterials.Length) {
 				sharedMaterials = new Material[parentMaterials.Length];
 			}
 			for (int i = 0; i < parentMaterials.Length; ++i) {
-				var parentMaterial = parentMaterials[i];
+				Material parentMaterial = parentMaterials[i];
 				if (replacementMaterialDict.ContainsKey(parentMaterial)) {
 					sharedMaterials[i] = replacementMaterialDict[parentMaterial];
 				}
@@ -143,7 +143,7 @@ namespace Spine.Unity.Examples {
 
 		void InitializeDict () {
 			for (int i = 0; i < replacementMaterials.Length; ++i) {
-				var entry = replacementMaterials[i];
+				MaterialReplacement entry = replacementMaterials[i];
 				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;
 
 			// Modify vertex positions by accessing Vector3[] vertexBuffer
-			var vertices = buffers.vertexBuffer;
+			Vector3[] vertices = buffers.vertexBuffer;
 			for (int i = 0; i < vertexCount; i++)
 				vertices[i] += (Vector3)(Random.insideUnitCircle * jitterMagnitude);
 
 			// 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
 
 			// Modify vertex positions by accessing Vector3[] vertexBuffer
-			var vertices = buffers.vertexBuffer;
+			Vector3[] vertices = buffers.vertexBuffer;
 			Vector3 transformedPos = default(Vector3);
 			for (int i = 0; i < vertexCount; 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; } }
 
 	void OnSceneGUI () {
-		var transform = Target.transform;
+		Transform transform = Target.transform;
 		LocalVectorHandle(ref Target.xAxis, transform, Color.red);
 		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;
 
 		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
 		void OnValidate () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
 			if (skeletonComponent != null) {
 				skeletonComponent.Skeleton.SetSlotsToSetupPose();
-				var animationStateComponent = GetComponent<IAnimationStateComponent>();
+				IAnimationStateComponent animationStateComponent = GetComponent<IAnimationStateComponent>();
 				if (animationStateComponent != null && animationStateComponent.AnimationState != null) {
 					animationStateComponent.AnimationState.Apply(skeletonComponent.Skeleton);
 				}
@@ -65,13 +65,13 @@ namespace Spine.Unity.Prototyping {
 		}
 
 		void ApplySettings () {
-			var skeletonComponent = GetComponent<ISkeletonComponent>();
+			ISkeletonComponent skeletonComponent = GetComponent<ISkeletonComponent>();
 			if (skeletonComponent != null) {
-				var skeleton = skeletonComponent.Skeleton;
+				Skeleton skeleton = skeletonComponent.Skeleton;
 				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);
 				}
 

+ 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 void PlayAnimationLooping (string animation) {
-		var entry = skeletonGraphic.AnimationState.SetAnimation(trackIndex, animation, true);
+		Spine.TrackEntry entry = skeletonGraphic.AnimationState.SetAnimation(trackIndex, animation, true);
 		entry.TimeScale = playbackSpeed;
 	}
 
 	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;
 	}
 

+ 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>();
 			AtlasAssetBase[] atlasAssets = skeletonGraphic.SkeletonDataAsset.atlasAssets;
 			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) {
 						meshRendererMaterialForTexture.Add(
 							new TextureMaterialPair(material.mainTexture, material));
@@ -109,7 +109,7 @@ namespace Spine.Unity.Examples {
 			skeletonGraphic.AssignMeshOverrideMultipleRenderers += RenderMultipleMeshesToRenderTexture;
 			skeletonGraphic.disableMeshAssignmentOnOverride = true;
 			skeletonGraphic.OnMeshAndMaterialsUpdated += RenderOntoQuad;
-			var canvasRenderers = skeletonGraphic.canvasRenderers;
+			List<CanvasRenderer> canvasRenderers = skeletonGraphic.canvasRenderers;
 			for (int i = 0; i < canvasRenderers.Count; ++i)
 				canvasRenderers[i].cull = true;
 
@@ -123,7 +123,7 @@ namespace Spine.Unity.Examples {
 			skeletonGraphic.AssignMeshOverrideMultipleRenderers -= RenderMultipleMeshesToRenderTexture;
 			skeletonGraphic.disableMeshAssignmentOnOverride = false;
 			skeletonGraphic.OnMeshAndMaterialsUpdated -= RenderOntoQuad;
-			var canvasRenderers = skeletonGraphic.canvasRenderers;
+			List<CanvasRenderer> canvasRenderers = skeletonGraphic.canvasRenderers;
 			for (int i = 0; i < canvasRenderers.Count; ++i)
 				canvasRenderers[i].cull = false;
 
@@ -214,8 +214,8 @@ namespace Spine.Unity.Examples {
 			quadRawImage.color = 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.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)
 					return new Rigidbody[0];
 
-				var rigidBodies = new Rigidbody[boneTable.Count];
+				Rigidbody[] rigidBodies = new Rigidbody[boneTable.Count];
 				int i = 0;
 				foreach (Transform t in boneTable.Values) {
 					rigidBodies[i] = t.GetComponent<Rigidbody>();
@@ -140,10 +140,10 @@ namespace Spine.Unity.Examples {
 			RootRigidbody = boneTable[StartingBone].GetComponent<Rigidbody>();
 			RootRigidbody.isKinematic = pinStartBone;
 			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;
 				boneColliders.Add(t.GetComponent<Collider>());
 				if (b == StartingBone) {
@@ -163,9 +163,9 @@ namespace Spine.Unity.Examples {
 				}
 
 				// Add joint and attach to parent.
-				var rbParent = parentTransform.GetComponent<Rigidbody>();
+				Rigidbody rbParent = parentTransform.GetComponent<Rigidbody>();
 				if (rbParent != null) {
-					var joint = t.gameObject.AddComponent<HingeJoint>();
+					HingeJoint joint = t.gameObject.AddComponent<HingeJoint>();
 					joint.connectedBody = rbParent;
 					Vector3 localPos = parentTransform.InverseTransformPoint(t.position);
 					localPos.x *= 1;
@@ -191,10 +191,10 @@ namespace Spine.Unity.Examples {
 			}
 
 			// Destroy existing override-mode SkeletonUtilityBones.
-			var utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
+			SkeletonUtilityBone[] utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
 			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) {
 						destroyedUtilityBoneNames.Add(ub.gameObject.name);
 						Destroy(ub.gameObject);
@@ -214,13 +214,13 @@ namespace Spine.Unity.Examples {
 
 			// Disable skeleton constraints.
 			if (disableIK) {
-				var ikConstraints = skeleton.IkConstraints;
+				ExposedList<IkConstraint> ikConstraints = skeleton.IkConstraints;
 				for (int i = 0, n = ikConstraints.Count; i < n; i++)
 					ikConstraints.Items[i].Mix = 0;
 			}
 
 			if (disableOtherConstraints) {
-				var transformConstraints = skeleton.TransformConstraints;
+				ExposedList<TransformConstraint> transformConstraints = skeleton.TransformConstraints;
 				for (int i = 0, n = transformConstraints.Count; i < n; i++) {
 					transformConstraints.Items[i].MixRotate = 0;
 					transformConstraints.Items[i].MixScaleX = 0;
@@ -230,7 +230,7 @@ namespace Spine.Unity.Examples {
 					transformConstraints.Items[i].MixY = 0;
 				}
 
-				var pathConstraints = skeleton.PathConstraints;
+				ExposedList<PathConstraint> pathConstraints = skeleton.PathConstraints;
 				for (int i = 0, n = pathConstraints.Count; i < n; i++) {
 					pathConstraints.Items[i].MixRotate = 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>
 		public void Remove () {
 			isActive = false;
-			foreach (var t in boneTable.Values)
+			foreach (Transform t in boneTable.Values)
 				Destroy(t.gameObject);
 
 			Destroy(ragdollRoot.gameObject);
@@ -285,7 +285,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		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;
 		}
 		#endregion
@@ -295,7 +295,7 @@ namespace Spine.Unity.Examples {
 			if (stopBoneNames.Contains(boneName))
 				return;
 
-			var boneGameObject = new GameObject(boneName);
+			GameObject boneGameObject = new GameObject(boneName);
 			boneGameObject.layer = colliderLayer;
 			Transform t = boneGameObject.transform;
 			boneTable.Add(b, t);
@@ -305,19 +305,19 @@ namespace Spine.Unity.Examples {
 			t.localRotation = Quaternion.Euler(0, 0, b.WorldRotationX - b.ShearX);
 			t.localScale = new Vector3(b.WorldScaleX, b.WorldScaleY, 1);
 
-			var colliders = AttachBoundingBoxRagdollColliders(b);
+			List<Collider> colliders = AttachBoundingBoxRagdollColliders(b);
 			if (colliders.Count == 0) {
 				float length = b.Data.Length;
 				if (length == 0) {
-					var ball = boneGameObject.AddComponent<SphereCollider>();
+					SphereCollider ball = boneGameObject.AddComponent<SphereCollider>();
 					ball.radius = thickness * 0.5f;
 				} else {
-					var box = boneGameObject.AddComponent<BoxCollider>();
+					BoxCollider box = boneGameObject.AddComponent<BoxCollider>();
 					box.size = new Vector3(length, thickness, thickness);
 					box.center = new Vector3(length * 0.5f, 0);
 				}
 			}
-			var rb = boneGameObject.AddComponent<Rigidbody>();
+			Rigidbody rb = boneGameObject.AddComponent<Rigidbody>();
 			rb.constraints = RigidbodyConstraints.FreezePositionZ;
 
 			foreach (Bone child in b.Children)
@@ -329,14 +329,14 @@ namespace Spine.Unity.Examples {
 			bool 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;
-				var parentBone = b.Parent;
+				Bone parentBone = b.Parent;
 				Transform parentTransform = isStartingBone ? ragdollRoot : boneTable[parentBone];
 				if (!isStartingBone) {
-					var parentBoneFlip = boneFlipTable[parentBone];
+					BoneFlipEntry parentBoneFlip = boneFlipTable[parentBone];
 					parentFlipX = parentBoneFlip.flipX;
 					parentFlipY = parentBoneFlip.flipY;
 				}
@@ -397,7 +397,7 @@ namespace Spine.Unity.Examples {
 		void GetStartBoneParentFlipState (out bool parentFlipX, out bool parentFlipY) {
 			parentFlipX = skeleton.ScaleX < 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) {
 				parentFlipX ^= parent.ScaleX < 0;
 				parentFlipY ^= parent.ScaleY < 0;
@@ -407,25 +407,25 @@ namespace Spine.Unity.Examples {
 
 		List<Collider> AttachBoundingBoxRagdollColliders (Bone b) {
 			const string AttachmentNameMarker = "ragdoll";
-			var colliders = new List<Collider>();
+			List<Collider> colliders = new List<Collider>();
 
 			Transform t = boneTable[b];
 			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) {
 				if (s.Bone == b) {
 					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 (!entry.Name.ToLower().Contains(AttachmentNameMarker))
 								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.size = bounds.size;
 							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)
 					return new Rigidbody2D[0];
 
-				var rigidBodies = new Rigidbody2D[boneTable.Count];
+				Rigidbody2D[] rigidBodies = new Rigidbody2D[boneTable.Count];
 				int i = 0;
 				foreach (Transform t in boneTable.Values) {
 					rigidBodies[i] = t.GetComponent<Rigidbody2D>();
@@ -142,10 +142,10 @@ namespace Spine.Unity.Examples {
 			RootRigidbody = boneTable[startingBone].GetComponent<Rigidbody2D>();
 			RootRigidbody.isKinematic = pinStartBone;
 			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;
 				boneColliders.Add(t.GetComponent<Collider2D>());
 				if (b == startingBone) {
@@ -165,9 +165,9 @@ namespace Spine.Unity.Examples {
 				}
 
 				// Add joint and attach to parent.
-				var rbParent = parentTransform.GetComponent<Rigidbody2D>();
+				Rigidbody2D rbParent = parentTransform.GetComponent<Rigidbody2D>();
 				if (rbParent != null) {
-					var joint = t.gameObject.AddComponent<HingeJoint2D>();
+					HingeJoint2D joint = t.gameObject.AddComponent<HingeJoint2D>();
 					joint.connectedBody = rbParent;
 					Vector3 localPos = parentTransform.InverseTransformPoint(t.position);
 					joint.connectedAnchor = localPos;
@@ -203,10 +203,10 @@ namespace Spine.Unity.Examples {
 			}
 
 			// Destroy existing override-mode SkeletonUtility bones.
-			var utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
+			SkeletonUtilityBone[] utilityBones = GetComponentsInChildren<SkeletonUtilityBone>();
 			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) {
 						destroyedUtilityBoneNames.Add(ub.gameObject.name);
 						Destroy(ub.gameObject);
@@ -226,13 +226,13 @@ namespace Spine.Unity.Examples {
 
 			// Disable skeleton constraints.
 			if (disableIK) {
-				var ikConstraints = skeleton.IkConstraints;
+				ExposedList<IkConstraint> ikConstraints = skeleton.IkConstraints;
 				for (int i = 0, n = ikConstraints.Count; i < n; i++)
 					ikConstraints.Items[i].Mix = 0;
 			}
 
 			if (disableOtherConstraints) {
-				var transformConstraints = skeleton.TransformConstraints;
+				ExposedList<TransformConstraint> transformConstraints = skeleton.TransformConstraints;
 				for (int i = 0, n = transformConstraints.Count; i < n; i++) {
 					transformConstraints.Items[i].MixRotate = 0;
 					transformConstraints.Items[i].MixScaleX = 0;
@@ -242,7 +242,7 @@ namespace Spine.Unity.Examples {
 					transformConstraints.Items[i].MixY = 0;
 				}
 
-				var pathConstraints = skeleton.PathConstraints;
+				ExposedList<PathConstraint> pathConstraints = skeleton.PathConstraints;
 				for (int i = 0, n = pathConstraints.Count; i < n; i++) {
 					pathConstraints.Items[i].MixRotate = 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>
 		public void Remove () {
 			isActive = false;
-			foreach (var t in boneTable.Values)
+			foreach (Transform t in boneTable.Values)
 				Destroy(t.gameObject);
 
 			Destroy(ragdollRoot.gameObject);
@@ -296,7 +296,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		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;
 		}
 		#endregion
@@ -307,7 +307,7 @@ namespace Spine.Unity.Examples {
 			if (stopBoneNames.Contains(boneName))
 				return;
 
-			var boneGameObject = new GameObject(boneName);
+			GameObject boneGameObject = new GameObject(boneName);
 			boneGameObject.layer = this.colliderLayer;
 			Transform t = boneGameObject.transform;
 			boneTable.Add(b, t);
@@ -317,20 +317,20 @@ namespace Spine.Unity.Examples {
 			t.localRotation = Quaternion.Euler(0, 0, b.WorldRotationX - b.ShearX);
 			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) {
 				float length = b.Data.Length;
 				if (length == 0) {
-					var circle = boneGameObject.AddComponent<CircleCollider2D>();
+					CircleCollider2D circle = boneGameObject.AddComponent<CircleCollider2D>();
 					circle.radius = thickness * 0.5f;
 				} else {
-					var box = boneGameObject.AddComponent<BoxCollider2D>();
+					BoxCollider2D box = boneGameObject.AddComponent<BoxCollider2D>();
 					box.size = new Vector2(length, thickness);
 					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>();
 			rb.gravityScale = this.gravityScale;
 
@@ -342,17 +342,17 @@ namespace Spine.Unity.Examples {
 		void UpdateSpineSkeleton (ISkeletonAnimation animatedSkeleton) {
 			bool parentFlipX;
 			bool parentFlipY;
-			var startingBone = this.StartingBone;
+			Bone startingBone = this.StartingBone;
 			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);
-				var parentBone = b.Parent;
+				Bone parentBone = b.Parent;
 				Transform parentTransform = isStartingBone ? ragdollRoot : boneTable[parentBone];
 				if (!isStartingBone) {
-					var parentBoneFlip = boneFlipTable[parentBone];
+					BoneFlipEntry parentBoneFlip = boneFlipTable[parentBone];
 					parentFlipX = parentBoneFlip.flipX;
 					parentFlipY = parentBoneFlip.flipY;
 				}
@@ -414,7 +414,7 @@ namespace Spine.Unity.Examples {
 		void GetStartBoneParentFlipState (out bool parentFlipX, out bool parentFlipY) {
 			parentFlipX = skeleton.ScaleX < 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) {
 				parentFlipX ^= parent.ScaleX < 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) {
 			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) {
 				if (slot.Bone == b) {
 					skin.GetAttachments(skeleton.Slots.IndexOf(slot), skinEntries);
 
 					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 (!entry.Name.ToLower().Contains(AttachmentNameMarker))
 								continue;
 
 							bbAttachmentAdded = true;
-							var bbCollider = SkeletonUtility.AddBoundingBoxAsComponent(bbAttachment, slot, go, isTrigger: false);
+							PolygonCollider2D bbCollider = SkeletonUtility.AddBoundingBoxAsComponent(bbAttachment, slot, go, isTrigger: false);
 							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>());
 
 			// Prepare shadow gameObject's properties.
-			var shadowRootTransform = shadowRoot.transform;
+			Transform shadowRootTransform = shadowRoot.transform;
 			shadowRootTransform.position = transform.position;
 			shadowRootTransform.rotation = transform.rotation;
 
@@ -79,19 +79,19 @@ namespace Spine.Unity.Examples {
 			if (hideShadow)
 				shadowRoot.hideFlags = HideFlags.HideInHierarchy;
 
-			var shadowJoints = shadowRoot.GetComponentsInChildren<Joint>();
+			Joint[] shadowJoints = shadowRoot.GetComponentsInChildren<Joint>();
 			foreach (Joint j in shadowJoints)
 				j.connectedAnchor *= scale;
 
 			// 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)
 					continue;
 
 				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) {
 						shadowTable.Add(new TransformPair {
 							dest = b.transform,
@@ -118,17 +118,17 @@ namespace Spine.Unity.Examples {
 
 		void FixedUpdate () {
 			if (physicsSystem == PhysicsSystem.Physics2D) {
-				var shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody2D>();
+				Rigidbody2D shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody2D>();
 				shadowRootRigidbody.MovePosition(transform.position);
 				shadowRootRigidbody.MoveRotation(transform.rotation.eulerAngles.z);
 			} else {
-				var shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody>();
+				Rigidbody shadowRootRigidbody = shadowRoot.GetComponent<Rigidbody>();
 				shadowRootRigidbody.MovePosition(transform.position);
 				shadowRootRigidbody.MoveRotation(transform.rotation);
 			}
 
 			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.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)
 				animationStateComponent = skeletonComponent as IAnimationStateComponent;
 			if (animationStateComponent == null) return;
-			var skeleton = skeletonComponent.Skeleton;
+			Skeleton skeleton = skeletonComponent.Skeleton;
 			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(); };
 				state.Event += ep.eventDelegate;
 			}
@@ -71,8 +71,8 @@ namespace Spine.Unity.Prototyping {
 			if (animationStateComponent == null) animationStateComponent = GetComponent<IAnimationStateComponent>();
 			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;
 				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.
 			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++) {
-				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.
 				sa.gameObject.name = i.ToString();
 				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.
 			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";
 
 			// 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) {
 			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);
 			skeleton.UpdateWorldTransform();

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

@@ -37,7 +37,7 @@ namespace Spine.Unity.Examples {
 
 		public void Start () {
 			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.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;
 
 		void Start () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
-			var skeleton = skeletonAnimation.Skeleton;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			Skeleton skeleton = skeletonAnimation.Skeleton;
 
 			hipBone = skeleton.FindBone(hip);
 			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;
 
 		void Start () {
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
-			var skeleton = skeletonAnimation.Skeleton;
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
+			Skeleton skeleton = skeletonAnimation.Skeleton;
 			eyeSlot = skeleton.FindSlot(eyeSlotName);
 			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 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));
 				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) {
-				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 newDisplacement = (otherLegDisplacementFromCenter * randomCompensate);
@@ -142,7 +142,7 @@ namespace Spine.Unity.Examples {
 
 		void Start () {
 			Time.timeScale = timeScale;
-			var tpos = transform.position;
+			Vector3 tpos = transform.position;
 
 			// Default starting positions.
 			nearFoot.worldPos = tpos;
@@ -153,7 +153,7 @@ namespace Spine.Unity.Examples {
 			farFoot.worldPos.x += comfyDistance;
 			farFoot.worldPosPrev = farFoot.worldPosNext = farFoot.worldPos;
 
-			var skeletonAnimation = GetComponent<SkeletonAnimation>();
+			SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
 			skeleton = skeletonAnimation.Skeleton;
 
 			skeletonAnimation.UpdateLocal += UpdateLocal;

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

@@ -55,10 +55,10 @@ namespace Spine.Unity.Examples {
 
 			particles.Stop();
 			particles.Clear();
-			var main = particles.main;
+			ParticleSystem.MainModule main = particles.main;
 			main.loop = false;
 
-			var state = skeletonAnimation.AnimationState;
+			AnimationState state = skeletonAnimation.AnimationState;
 			while (true) {
 
 				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;
 
 		IEnumerator Start () {
-			var state = skeletonAnimation.state;
+			AnimationState state = skeletonAnimation.state;
 
 			while (true) {
 				// Run phase
@@ -64,14 +64,14 @@ namespace Spine.Unity.Examples {
 				// Hit phase
 				SetXPosition(endX);
 				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 WaitForSeconds(1f);
 			}
 		}
 
 		void SetXPosition (float x) {
-			var tp = transform.localPosition;
+			Vector3 tp = transform.localPosition;
 			tp.x = x;
 			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;
 
 		IEnumerator Start () {
-			var state = skeletonGraphic.AnimationState;
+			AnimationState state = skeletonGraphic.AnimationState;
 
 			while (true) {
 				// Run phase
@@ -63,14 +63,14 @@ namespace Spine.Unity.Examples {
 				// Hit phase
 				SetXPosition(endX);
 				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 WaitForSeconds(1f);
 			}
 		}
 
 		void SetXPosition (float x) {
-			var tp = transform.localPosition;
+			Vector3 tp = transform.localPosition;
 			tp.x = x;
 			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;
 			if (ThisSkeletonDataAsset != null) {
-				var skeletonData = ThisSkeletonDataAsset.GetSkeletonData(true);
+				SkeletonData skeletonData = ThisSkeletonDataAsset.GetSkeletonData(true);
 				if (skeletonData != null) {
 					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 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));
 				AnimationReferenceAsset existingAsset = AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(assetPath);
 				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) {
 				Selection.activeObject = folderObject;
 				EditorGUIUtility.PingObject(folderObject);
@@ -339,7 +339,7 @@ namespace Spine.Unity.Editor {
 			using (new EditorGUILayout.HorizontalScope()) {
 				EditorGUILayout.LabelField("SkeletonData", EditorStyles.boldLabel);
 				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}",
 						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));
@@ -383,7 +383,7 @@ namespace Spine.Unity.Editor {
 
 		void HandleAtlasAssetsNulls () {
 			bool hasNulls = false;
-			foreach (var a in targetSkeletonDataAsset.atlasAssets) {
+			foreach (AtlasAssetBase a in targetSkeletonDataAsset.atlasAssets) {
 				if (a == null) {
 					hasNulls = true;
 					break;
@@ -395,8 +395,8 @@ namespace Spine.Unity.Editor {
 				} else {
 					EditorGUILayout.HelpBox("Atlas array should not have null entries!", MessageType.Error);
 					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)
 								trimmedAtlasAssets.Add(a);
 						}
@@ -483,7 +483,7 @@ namespace Spine.Unity.Editor {
 			//float fps = targetSkeletonData.Fps;
 			//if (nonessential && fps == 0) fps = 30;
 
-			var activeTrack = preview.ActiveTrack;
+			TrackEntry activeTrack = preview.ActiveTrack;
 			foreach (Animation animation in targetSkeletonData.Animations) {
 				using (new GUILayout.HorizontalScope()) {
 					if (isPreviewWindowOpen) {
@@ -510,7 +510,7 @@ namespace Spine.Unity.Editor {
 			if (!showSlotList) return;
 			if (!preview.IsValid) return;
 
-			var defaultSkin = targetSkeletonData.DefaultSkin;
+			Skin defaultSkin = targetSkeletonData.DefaultSkin;
 			Skin skin = preview.Skeleton.Skin ?? defaultSkin;
 
 			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--) {
 					Slot slot = slotsItems[i];
 					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++) {
-								var skinEntry = slotAttachments[a];
+								Skin.SkinEntry skinEntry = slotAttachments[a];
 								Attachment attachment = skinEntry.Attachment;
 								string attachmentName = skinEntry.Name;
 								bool attachmentIsFromSkin = !defaultSkinAttachments.Contains(skinEntry);
@@ -627,7 +627,7 @@ namespace Spine.Unity.Editor {
 			if (skeletonJSON.objectReferenceValue == null) {
 				warnings.Add("Missing Skeleton JSON");
 			} else {
-				var fieldValue = (TextAsset)skeletonJSON.objectReferenceValue;
+				TextAsset fieldValue = (TextAsset)skeletonJSON.objectReferenceValue;
 				string problemDescription = null;
 				if (!AssetUtility.IsSpineData(fieldValue, out compatibilityProblemInfo, ref problemDescription)) {
 					if (problemDescription != null)
@@ -646,8 +646,8 @@ namespace Spine.Unity.Editor {
 
 					if (searchForSpineAtlasAssets) {
 						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++) {
 							if (actualAtlasAssets[i] == null) {
@@ -665,7 +665,7 @@ namespace Spine.Unity.Editor {
 							List<string> missingPaths = null;
 							if (atlasAssets.arraySize > 0) {
 								missingPaths = AssetUtility.GetRequiredAtlasRegions(AssetDatabase.GetAssetPath(skeletonJSON.objectReferenceValue));
-								foreach (var atlas in atlasList) {
+								foreach (Atlas atlas in atlasList) {
 									if (atlas == null)
 										continue;
 									for (int i = 0; i < missingPaths.Count; i++) {
@@ -720,7 +720,7 @@ namespace Spine.Unity.Editor {
 				return false;
 
 			for (int i = 0; i < atlasAssets.arraySize; i++) {
-				var prop = atlasAssets.GetArrayElementAtIndex(i);
+				SerializedProperty prop = atlasAssets.GetArrayElementAtIndex(i);
 				if (prop.objectReferenceValue == null)
 					return false;
 			}
@@ -793,7 +793,7 @@ namespace Spine.Unity.Editor {
 		public bool IsPlayingAnimation {
 			get {
 				if (!IsValid) return false;
-				var currentTrack = skeletonAnimation.AnimationState.GetCurrent(0);
+				TrackEntry currentTrack = skeletonAnimation.AnimationState.GetCurrent(0);
 				return currentTrack != null && currentTrack.TimeScale > 0;
 			}
 		}
@@ -852,7 +852,7 @@ namespace Spine.Unity.Editor {
 				animationLastTime = CurrentTime;
 
 				{
-					var c = this.PreviewUtilityCamera;
+					Camera c = this.PreviewUtilityCamera;
 					c.orthographic = true;
 					c.cullingMask = PreviewCameraCullingMask;
 					c.nearClipPlane = 0.01f;
@@ -910,7 +910,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		public Texture2D GetStaticPreview (int width, int height) {
-			var c = this.PreviewUtilityCamera;
+			Camera c = this.PreviewUtilityCamera;
 			if (c == null)
 				return null;
 
@@ -920,7 +920,7 @@ namespace Spine.Unity.Editor {
 			c.transform.position = cameraPositionGoal;
 			previewRenderUtility.BeginStaticPreview(new Rect(0, 0, width, height));
 			DoRenderPreview(false);
-			var tex = previewRenderUtility.EndStaticPreview();
+			Texture2D tex = previewRenderUtility.EndStaticPreview();
 
 			return tex;
 		}
@@ -931,7 +931,7 @@ namespace Spine.Unity.Editor {
 
 			GameObject go = previewGameObject;
 			if (requiresRefresh && go != null) {
-				var renderer = go.GetComponent<Renderer>();
+				Renderer renderer = go.GetComponent<Renderer>();
 				renderer.enabled = true;
 
 
@@ -943,7 +943,7 @@ namespace Spine.Unity.Editor {
 					skeletonAnimation.LateUpdate();
 				}
 
-				var thisPreviewUtilityCamera = this.PreviewUtilityCamera;
+				Camera thisPreviewUtilityCamera = this.PreviewUtilityCamera;
 
 				if (drawHandles) {
 					Handles.SetCamera(thisPreviewUtilityCamera);
@@ -979,7 +979,7 @@ namespace Spine.Unity.Editor {
 			lastCameraPositionGoal = cameraPositionGoal;
 			lastCameraOrthoGoal = cameraOrthoGoal;
 
-			var c = this.PreviewUtilityCamera;
+			Camera c = this.PreviewUtilityCamera;
 			float orthoSet = Mathf.Lerp(c.orthographicSize, cameraOrthoGoal, 0.1f);
 
 			c.orthographicSize = orthoSet;
@@ -1046,14 +1046,14 @@ namespace Spine.Unity.Editor {
 				return;
 			}
 
-			var targetAnimation = skeletonData.FindAnimation(animationName);
+			Animation targetAnimation = skeletonData.FindAnimation(animationName);
 			if (targetAnimation != null) {
-				var currentTrack = this.ActiveTrack;
+				TrackEntry currentTrack = this.ActiveTrack;
 				bool isEmpty = (currentTrack == null);
 				bool isNewAnimation = isEmpty || currentTrack.Animation != targetAnimation;
 
-				var skeleton = skeletonAnimation.Skeleton;
-				var animationState = skeletonAnimation.AnimationState;
+				Skeleton skeleton = skeletonAnimation.Skeleton;
+				AnimationState animationState = skeletonAnimation.AnimationState;
 
 				if (isEmpty) {
 					skeleton.SetToSetupPose();
@@ -1072,7 +1072,7 @@ namespace Spine.Unity.Editor {
 					currentAnimationEvents.Clear();
 					currentAnimationEventTimes.Clear();
 					foreach (Timeline timeline in targetAnimation.Timelines) {
-						var eventTimeline = timeline as EventTimeline;
+						EventTimeline eventTimeline = timeline as EventTimeline;
 						if (eventTimeline != null) {
 							for (int i = 0; i < eventTimeline.Events.Length; i++) {
 								currentAnimationEvents.Add(eventTimeline.Events[i]);
@@ -1090,7 +1090,7 @@ namespace Spine.Unity.Editor {
 		void DrawSkinToolbar (Rect r) {
 			if (!this.IsValid) return;
 
-			var skeleton = this.Skeleton;
+			Skeleton skeleton = this.Skeleton;
 			string label = (skeleton.Skin != null) ? skeleton.Skin.Name : "default";
 
 			Rect popRect = new Rect(r);
@@ -1113,7 +1113,7 @@ namespace Spine.Unity.Editor {
 			if (!this.IsValid)
 				return;
 
-			var skeleton = this.Skeleton;
+			Skeleton skeleton = this.Skeleton;
 
 			Rect popRect = new Rect(r);
 			popRect.y += 64;
@@ -1132,7 +1132,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		void DrawSkinDropdown () {
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 			foreach (Skin s in skeletonData.Skins)
 				menu.AddItem(new GUIContent(s.Name, Icons.skin), skeletonAnimation.skeleton.Skin == s, HandleSkinDropdownSelection, s);
 
@@ -1179,10 +1179,10 @@ namespace Spine.Unity.Editor {
 				currentAnimationEventTooltips.Clear();
 				for (int i = 0; i < currentAnimationEvents.Count; 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 iconY = barRect.y + userEventIcon.height;
-					var evRect = new Rect(barRect) {
+					Rect evRect = new Rect(barRect) {
 						x = iconX,
 						y = iconY,
 						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++) {
 				SerializedProperty prop = materials.GetArrayElementAtIndex(i);
-				var material = (Material)prop.objectReferenceValue;
+				Material material = (Material)prop.objectReferenceValue;
 				if (material == null) {
 					EditorGUILayout.HelpBox("Materials cannot be null.", MessageType.Error);
 					return;
@@ -134,10 +134,10 @@ namespace Spine.Unity.Editor {
 
 			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."))) {
-				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());
-					var importer = (TextureImporter)TextureImporter.GetAtPath(texturePath);
+					TextureImporter importer = (TextureImporter)TextureImporter.GetAtPath(texturePath);
 					importer.mipMapBias = SpinePreferences.DEFAULT_MIPMAPBIAS;
 					EditorUtility.SetDirty(texture);
 				}
@@ -147,8 +147,8 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.Space();
 			if (atlasFile.objectReferenceValue != null) {
 				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);
 				}
 			}
@@ -267,7 +267,7 @@ namespace Spine.Unity.Editor {
 
 				int baseIndent = EditorGUI.indentLevel;
 
-				var regions = SpineAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
+				List<AtlasRegion> regions = SpineAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
 				int regionsCount = regions.Count;
 				using (new EditorGUILayout.HorizontalScope()) {
 					EditorGUILayout.LabelField("Atlas Regions", EditorStyles.boldLabel);
@@ -314,17 +314,17 @@ namespace Spine.Unity.Editor {
 
 		static public void UpdateSpriteSlices (Texture texture, Atlas atlas) {
 			string texturePath = AssetDatabase.GetAssetPath(texture.GetInstanceID());
-			var t = (TextureImporter)TextureImporter.GetAtPath(texturePath);
+			TextureImporter t = (TextureImporter)TextureImporter.GetAtPath(texturePath);
 			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 = { '.' };
 			int updatedCount = 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 textureName = texture.name;
 				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;
 
 					if (spriteNameMatchExists) {
-						var s = sprites[spriteIndex];
+						SpriteMetaData s = sprites[spriteIndex];
 						s.rect = spriteRect;
 						sprites[spriteIndex] = s;
 						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++) {
 				SerializedProperty prop = materials.GetArrayElementAtIndex(i);
-				var material = (Material)prop.objectReferenceValue;
+				Material material = (Material)prop.objectReferenceValue;
 				if (material == null) {
 					EditorGUILayout.HelpBox("Materials cannot be null.", MessageType.Error);
 					return;
@@ -106,7 +106,7 @@ namespace Spine.Unity.Editor {
 			if (atlasFile.objectReferenceValue != null) {
 				int baseIndent = EditorGUI.indentLevel;
 
-				var regions = SpineSpriteAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
+				List<AtlasRegion> regions = SpineSpriteAtlasAssetInspector.GetRegions(atlasAsset.GetAtlas());
 				int regionsCount = regions.Count;
 				using (new EditorGUILayout.HorizontalScope()) {
 					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
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoneFollower GameObject")]
 		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.localPosition = Vector3.zero;
 
-			var f = go.AddComponent<BoneFollowerGraphic>();
+			BoneFollowerGraphic f = go.AddComponent<BoneFollowerGraphic>();
 			f.skeletonGraphic = skeletonGraphic;
 			f.SetBone(skeletonGraphic.Skeleton.RootBone.Data.Name);
 
@@ -64,7 +64,7 @@ namespace Spine.Unity.Editor {
 		// Validate
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoneFollower GameObject", true)]
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonGraphic = cmd.context as SkeletonGraphic;
+			SkeletonGraphic skeletonGraphic = cmd.context as SkeletonGraphic;
 			return skeletonGraphic.IsValid;
 		}
 		#endregion
@@ -93,13 +93,13 @@ namespace Spine.Unity.Editor {
 		}
 
 		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;
 
-			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;
 
 			if (string.IsNullOrEmpty(boneName.stringValue)) {
@@ -107,7 +107,7 @@ namespace Spine.Unity.Editor {
 				SpineHandles.DrawBoneNames(transform, skeleton, positionScale);
 				Handles.Label(tbf.transform.position, "No bone selected", EditorStyles.helpBox);
 			} else {
-				var targetBone = tbf.bone;
+				Bone targetBone = tbf.bone;
 				if (targetBone == null) return;
 
 				SpineHandles.DrawBoneWireframe(transform, targetBone, SpineHandles.TransformContraintColor, positionScale);
@@ -119,8 +119,8 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.isEditingMultipleObjects) {
 				if (needsReset) {
 					needsReset = false;
-					foreach (var o in targets) {
-						var bf = (BoneFollower)o;
+					foreach (Object o in targets) {
+						BoneFollower bf = (BoneFollower)o;
 						bf.Initialize();
 						bf.LateUpdate();
 					}
@@ -151,7 +151,7 @@ namespace Spine.Unity.Editor {
 			}
 
 			EditorGUILayout.PropertyField(skeletonGraphic);
-			var skeletonGraphicComponent = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
+			SkeletonGraphic skeletonGraphicComponent = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
 			if (skeletonGraphicComponent != null) {
 				if (skeletonGraphicComponent.gameObject == targetBoneFollower.gameObject) {
 					skeletonGraphic.objectReferenceValue = null;
@@ -182,7 +182,7 @@ namespace Spine.Unity.Editor {
 
 				//BoneFollowerInspector.RecommendRigidbodyButton(targetBoneFollower);
 			} else {
-				var boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
+				SkeletonGraphic boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
 				if (boneFollowerSkeletonGraphic == null) {
 					EditorGUILayout.HelpBox("SkeletonGraphic is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
 				} 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");
 			if (wasUndo)
 				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
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoneFollower GameObject")]
 		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.localPosition = Vector3.zero;
 
-			var f = go.AddComponent<BoneFollower>();
+			BoneFollower f = go.AddComponent<BoneFollower>();
 			f.skeletonRenderer = skeletonRenderer;
 
 			EditorGUIUtility.PingObject(t);
@@ -62,7 +62,7 @@ namespace Spine.Unity.Editor {
 		// Validate
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoneFollower GameObject", true)]
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
 			return skeletonRenderer.valid;
 		}
 
@@ -103,19 +103,19 @@ namespace Spine.Unity.Editor {
 		}
 
 		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;
 
-			var transform = skeletonRendererComponent.transform;
-			var skeleton = skeletonRendererComponent.skeleton;
+			Transform transform = skeletonRendererComponent.transform;
+			Skeleton skeleton = skeletonRendererComponent.skeleton;
 
 			if (string.IsNullOrEmpty(boneName.stringValue)) {
 				SpineHandles.DrawBones(transform, skeleton);
 				SpineHandles.DrawBoneNames(transform, skeleton);
 				Handles.Label(tbf.transform.position, "No bone selected", EditorStyles.helpBox);
 			} else {
-				var targetBone = tbf.bone;
+				Bone targetBone = tbf.bone;
 				if (targetBone == null) return;
 				SpineHandles.DrawBoneWireframe(transform, targetBone, SpineHandles.TransformContraintColor);
 				Handles.Label(targetBone.GetWorldPosition(transform), targetBone.Data.Name, SpineHandles.BoneNameStyle);
@@ -126,8 +126,8 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.isEditingMultipleObjects) {
 				if (needsReset) {
 					needsReset = false;
-					foreach (var o in targets) {
-						var bf = (BoneFollower)o;
+					foreach (UnityEngine.Object o in targets) {
+						BoneFollower bf = (BoneFollower)o;
 						bf.Initialize();
 						bf.LateUpdate();
 					}
@@ -158,7 +158,7 @@ namespace Spine.Unity.Editor {
 			}
 
 			EditorGUILayout.PropertyField(skeletonRenderer);
-			var skeletonRendererReference = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
+			SkeletonRenderer skeletonRendererReference = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
 			if (skeletonRendererReference != null) {
 				if (skeletonRendererReference.gameObject == targetBoneFollower.gameObject) {
 					skeletonRenderer.objectReferenceValue = null;
@@ -189,7 +189,7 @@ namespace Spine.Unity.Editor {
 
 				BoneFollowerInspector.RecommendRigidbodyButton(targetBoneFollower);
 			} else {
-				var boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
+				SkeletonRenderer boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
 				if (boneFollowerSkeletonRenderer == null) {
 					EditorGUILayout.HelpBox("SkeletonRenderer is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
 				} 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");
 			if (wasUndo)
 				targetBoneFollower.Initialize();
@@ -218,9 +218,9 @@ namespace Spine.Unity.Editor {
 			if (missingRigidBody) {
 				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);
-					var rbType = hasCollider2D ? typeof(Rigidbody2D) : typeof(Rigidbody);
+					System.Type rbType = hasCollider2D ? typeof(Rigidbody2D) : typeof(Rigidbody);
 					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);
 				}
 			}

+ 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.
 			if (skeletonGraphic.objectReferenceValue == null) {
-				var foundSkeletonGraphic = follower.GetComponentInParent<SkeletonGraphic>();
+				SkeletonGraphic foundSkeletonGraphic = follower.GetComponentInParent<SkeletonGraphic>();
 				if (foundSkeletonGraphic != null)
 					Debug.Log("BoundingBoxFollowerGraphic automatically assigned: " + foundSkeletonGraphic.gameObject.name);
 				else if (Event.current.type == EventType.Repaint)
@@ -92,7 +92,7 @@ namespace Spine.Unity.Editor {
 				InitializeEditor();
 			}
 
-			var skeletonGraphicValue = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
+			SkeletonGraphic skeletonGraphicValue = skeletonGraphic.objectReferenceValue as SkeletonGraphic;
 			if (skeletonGraphicValue != null && skeletonGraphicValue.gameObject == follower.gameObject) {
 				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);
@@ -133,7 +133,7 @@ namespace Spine.Unity.Editor {
 					serializedObject.ApplyModifiedProperties();
 					InitializeEditor();
 					if (colliderParamChanged)
-						foreach (var col in follower.colliderTable.Values) {
+						foreach (PolygonCollider2D col in follower.colliderTable.Values) {
 							col.isTrigger = isTrigger.boolValue;
 							col.usedByEffector = usedByEffector.boolValue;
 							col.usedByComposite = usedByComposite.boolValue;
@@ -147,7 +147,7 @@ namespace Spine.Unity.Editor {
 				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.
-				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.");
 
 			} else {
@@ -156,9 +156,9 @@ namespace Spine.Unity.Editor {
 						EditorGUI.indentLevel++;
 						EditorGUILayout.LabelField(string.Format("Attachment Names ({0} PolygonCollider2D)", follower.colliderTable.Count));
 						EditorGUI.BeginChangeCheck();
-						foreach (var kp in follower.nameTable) {
+						foreach (KeyValuePair<BoundingBoxAttachment, string> kp in follower.nameTable) {
 							string attachmentName = kp.Value;
-							var collider = follower.colliderTable[kp.Key];
+							PolygonCollider2D 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);
 						}
@@ -183,7 +183,7 @@ namespace Spine.Unity.Editor {
 
 			if (Event.current.type == EventType.Repaint) {
 				if (addBoneFollower) {
-					var boneFollower = follower.gameObject.AddComponent<BoneFollowerGraphic>();
+					BoneFollowerGraphic boneFollower = follower.gameObject.AddComponent<BoneFollowerGraphic>();
 					boneFollower.skeletonGraphic = skeletonGraphicValue;
 					boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
 					addBoneFollower = false;
@@ -204,14 +204,14 @@ namespace Spine.Unity.Editor {
 		#region Menus
 		[MenuItem("CONTEXT/SkeletonGraphic/Add BoundingBoxFollowerGraphic GameObject")]
 		static void AddBoundingBoxFollowerGraphicChild (MenuCommand command) {
-			var go = AddBoundingBoxFollowerGraphicChild((SkeletonGraphic)command.context);
+			GameObject go = AddBoundingBoxFollowerGraphicChild((SkeletonGraphic)command.context);
 			Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollowerGraphic");
 		}
 
 		[MenuItem("CONTEXT/SkeletonGraphic/Add all BoundingBoxFollowerGraphic GameObjects")]
 		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");
 		}
 		#endregion
@@ -220,10 +220,10 @@ namespace Spine.Unity.Editor {
 			BoundingBoxFollowerGraphic original = null, string name = "BoundingBoxFollowerGraphic",
 			string slotName = null) {
 
-			var go = EditorInstantiation.NewGameObject(name, true);
+			GameObject go = EditorInstantiation.NewGameObject(name, true);
 			go.transform.SetParent(skeletonGraphic.transform, false);
 			go.AddComponent<RectTransform>();
-			var newFollower = go.AddComponent<BoundingBoxFollowerGraphic>();
+			BoundingBoxFollowerGraphic newFollower = go.AddComponent<BoundingBoxFollowerGraphic>();
 
 			if (original != null) {
 				newFollower.slotName = original.slotName;
@@ -247,18 +247,18 @@ namespace Spine.Unity.Editor {
 			SkeletonGraphic skeletonGraphic, BoundingBoxFollowerGraphic original = null) {
 
 			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)
 						continue;
 					int slotIndex = entry.SlotIndex;
-					var slot = skeletonGraphic.Skeleton.Slots.Items[slotIndex];
+					Slot slot = skeletonGraphic.Skeleton.Slots.Items[slotIndex];
 					string slotName = slot.Data.Name;
 					GameObject go = AddBoundingBoxFollowerGraphicChild(skeletonGraphic,
 						original, boundingBoxAttachment.Name, slotName);
-					var boneFollower = go.AddComponent<BoneFollowerGraphic>();
+					BoneFollowerGraphic boneFollower = go.AddComponent<BoneFollowerGraphic>();
 					boneFollower.skeletonGraphic = skeletonGraphic;
 					boneFollower.SetBone(slot.Data.BoneData.Name);
 					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.
 			if (skeletonRenderer.objectReferenceValue == null) {
-				var foundSkeletonRenderer = follower.GetComponentInParent<SkeletonRenderer>();
+				SkeletonRenderer foundSkeletonRenderer = follower.GetComponentInParent<SkeletonRenderer>();
 				if (foundSkeletonRenderer != null)
 					Debug.Log("BoundingBoxFollower automatically assigned: " + foundSkeletonRenderer.gameObject.name);
 				else if (Event.current.type == EventType.Repaint)
@@ -92,7 +92,7 @@ namespace Spine.Unity.Editor {
 				InitializeEditor();
 			}
 
-			var skeletonRendererValue = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
+			SkeletonRenderer skeletonRendererValue = skeletonRenderer.objectReferenceValue as SkeletonRenderer;
 			if (skeletonRendererValue != null && skeletonRendererValue.gameObject == follower.gameObject) {
 				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);
@@ -133,7 +133,7 @@ namespace Spine.Unity.Editor {
 					serializedObject.ApplyModifiedProperties();
 					InitializeEditor();
 					if (colliderParamChanged)
-						foreach (var col in follower.colliderTable.Values) {
+						foreach (PolygonCollider2D col in follower.colliderTable.Values) {
 							col.isTrigger = isTrigger.boolValue;
 							col.usedByEffector = usedByEffector.boolValue;
 							col.usedByComposite = usedByComposite.boolValue;
@@ -147,7 +147,7 @@ namespace Spine.Unity.Editor {
 				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.
-				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.");
 
 			} else {
@@ -156,11 +156,11 @@ namespace Spine.Unity.Editor {
 						EditorGUI.indentLevel++;
 						EditorGUILayout.LabelField(string.Format("Attachment Names ({0} PolygonCollider2D)", follower.colliderTable.Count));
 						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();
 						EditorGUI.indentLevel--;
@@ -183,7 +183,7 @@ namespace Spine.Unity.Editor {
 
 			if (Event.current.type == EventType.Repaint) {
 				if (addBoneFollower) {
-					var boneFollower = follower.gameObject.AddComponent<BoneFollower>();
+					BoneFollower boneFollower = follower.gameObject.AddComponent<BoneFollower>();
 					boneFollower.skeletonRenderer = skeletonRendererValue;
 					boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
 					addBoneFollower = false;
@@ -204,14 +204,14 @@ namespace Spine.Unity.Editor {
 		#region Menus
 		[MenuItem("CONTEXT/SkeletonRenderer/Add BoundingBoxFollower GameObject")]
 		static void AddBoundingBoxFollowerChild (MenuCommand command) {
-			var go = AddBoundingBoxFollowerChild((SkeletonRenderer)command.context);
+			GameObject go = AddBoundingBoxFollowerChild((SkeletonRenderer)command.context);
 			Undo.RegisterCreatedObjectUndo(go, "Add BoundingBoxFollower");
 		}
 
 		[MenuItem("CONTEXT/SkeletonRenderer/Add all BoundingBoxFollower GameObjects")]
 		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");
 		}
 		#endregion
@@ -220,9 +220,9 @@ namespace Spine.Unity.Editor {
 			BoundingBoxFollower original = null, string name = "BoundingBoxFollower",
 			string slotName = null) {
 
-			var go = EditorInstantiation.NewGameObject(name, true);
+			GameObject go = EditorInstantiation.NewGameObject(name, true);
 			go.transform.SetParent(skeletonRenderer.transform, false);
-			var newFollower = go.AddComponent<BoundingBoxFollower>();
+			BoundingBoxFollower newFollower = go.AddComponent<BoundingBoxFollower>();
 
 			if (original != null) {
 				newFollower.slotName = original.slotName;
@@ -246,18 +246,18 @@ namespace Spine.Unity.Editor {
 			SkeletonRenderer skeletonRenderer, BoundingBoxFollower original = null) {
 
 			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)
 						continue;
 					int slotIndex = entry.SlotIndex;
-					var slot = skeletonRenderer.Skeleton.Slots.Items[slotIndex];
+					Slot slot = skeletonRenderer.Skeleton.Slots.Items[slotIndex];
 					string slotName = slot.Data.Name;
 					GameObject go = AddBoundingBoxFollowerChild(skeletonRenderer,
 						original, boundingBoxAttachment.Name, slotName);
-					var boneFollower = go.AddComponent<BoneFollower>();
+					BoneFollower boneFollower = go.AddComponent<BoneFollower>();
 					boneFollower.skeletonRenderer = skeletonRenderer;
 					boneFollower.SetBone(slot.Data.BoneData.Name);
 					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
 		[MenuItem("CONTEXT/SkeletonRenderer/Add PointFollower GameObject")]
 		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.localPosition = Vector3.zero;
 
-			var f = go.AddComponent<PointFollower>();
+			PointFollower f = go.AddComponent<PointFollower>();
 			f.skeletonRenderer = skeletonRenderer;
 
 			EditorGUIUtility.PingObject(t);
@@ -62,7 +62,7 @@ namespace Spine.Unity.Editor {
 		// Validate
 		[MenuItem("CONTEXT/SkeletonRenderer/Add PointFollower GameObject", true)]
 		static bool ValidateAddBoneFollowerGameObject (MenuCommand cmd) {
-			var skeletonRenderer = cmd.context as SkeletonRenderer;
+			SkeletonRenderer skeletonRenderer = cmd.context as SkeletonRenderer;
 			return skeletonRenderer.valid;
 		}
 		#endregion
@@ -85,24 +85,24 @@ namespace Spine.Unity.Editor {
 		}
 
 		public void OnSceneGUI () {
-			var tbf = target as PointFollower;
-			var skeletonRendererComponent = tbf.skeletonRenderer;
+			PointFollower tbf = target as PointFollower;
+			SkeletonRenderer skeletonRendererComponent = tbf.skeletonRenderer;
 			if (skeletonRendererComponent == null)
 				return;
 
-			var skeleton = skeletonRendererComponent.skeleton;
-			var skeletonTransform = skeletonRendererComponent.transform;
+			Skeleton skeleton = skeletonRendererComponent.skeleton;
+			Transform skeletonTransform = skeletonRendererComponent.transform;
 
 			if (string.IsNullOrEmpty(pointAttachmentName.stringValue)) {
 				// 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 != null) DrawPointsInSkin(currentSkin, skeleton, skeletonTransform);
 			} else {
 				Slot slot = skeleton.FindSlot(slotName.stringValue);
 				if (slot != null) {
 					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) {
 						DrawPointAttachmentWithLabel(point, slot.Bone, skeletonTransform);
 					}
@@ -111,10 +111,10 @@ namespace Spine.Unity.Editor {
 		}
 
 		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) {
-					var slot = skeleton.Slots.Items[skinEntry.SlotIndex];
+					Slot slot = skeleton.Slots.Items[skinEntry.SlotIndex];
 					DrawPointAttachmentWithLabel(attachment, slot.Bone, transform);
 				}
 			}
@@ -130,8 +130,8 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.isEditingMultipleObjects) {
 				if (needsReset) {
 					needsReset = false;
-					foreach (var o in targets) {
-						var bf = (BoneFollower)o;
+					foreach (Object o in targets) {
+						BoneFollower bf = (BoneFollower)o;
 						bf.Initialize();
 						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.gameObject == targetPointFollower.gameObject) {
 					skeletonRenderer.objectReferenceValue = null;
@@ -175,7 +175,7 @@ namespace Spine.Unity.Editor {
 				needsReset = true;
 			}
 
-			var current = Event.current;
+			Event current = Event.current;
 			bool wasUndo = (current.type == EventType.ValidateCommand && current.commandName == "UndoRedoPerformed");
 			if (wasUndo)
 				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;
 			bool sameData = SpineInspectorUtility.TargetsUseSameData(serializedObject);
 
-			foreach (var o in targets)
+			foreach (UnityEngine.Object o in targets)
 				TrySetAnimation(o as SkeletonAnimation);
 
 			EditorGUILayout.Space();
@@ -74,8 +74,8 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.PropertyField(loop, LoopLabel);
 			wasAnimationParameterChanged |= EditorGUI.EndChangeCheck(); // Value used in the next update.
 			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);
 			}
 			EditorGUILayout.PropertyField(unscaledTime, UnscaledTimeLabel);
@@ -99,8 +99,8 @@ namespace Spine.Unity.Editor {
 					((activeAnimation != animationName.stringValue) || (activeLoop != loop.boolValue));
 				if (animationParameterChanged) {
 					this.wasAnimationParameterChanged = false;
-					var skeleton = skeletonAnimation.Skeleton;
-					var state = skeletonAnimation.AnimationState;
+					Skeleton skeleton = skeletonAnimation.Skeleton;
+					AnimationState state = skeletonAnimation.AnimationState;
 
 					if (!Application.isPlaying) {
 						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
 		[MenuItem("CONTEXT/SkeletonGraphic/Add Basic Serialized Custom Materials")]
 		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");
 		}
 
 		[MenuItem("CONTEXT/SkeletonGraphic/Add Basic Serialized Custom Materials", true)]
 		static bool AddSkeletonGraphicCustomMaterials_Validate (MenuCommand menuCommand) {
-			var skeletonGraphic = (SkeletonGraphic)menuCommand.context;
+			SkeletonGraphic skeletonGraphic = (SkeletonGraphic)menuCommand.context;
 			return (skeletonGraphic.GetComponent<SkeletonGraphicCustomMaterials>() == null);
 		}
 		#endregion
@@ -72,7 +72,7 @@ namespace Spine.Unity.Editor {
 
 		public override void OnInspectorGUI () {
 			component = (SkeletonGraphicCustomMaterials)target;
-			var skeletonGraphic = component.skeletonGraphic;
+			SkeletonGraphic skeletonGraphic = component.skeletonGraphic;
 
 			// Draw the default inspector
 			DrawDefaultInspector();

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

@@ -35,6 +35,7 @@
 #define HAS_CULL_TRANSPARENT_MESH
 #endif
 
+using System.Reflection;
 using UnityEditor;
 using UnityEngine;
 
@@ -75,14 +76,14 @@ namespace Spine.Unity.Editor {
 		protected bool TargetIsValid {
 			get {
 				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)
 							return false;
 					}
 					return true;
 				} else {
-					var component = (SkeletonGraphic)target;
+					SkeletonGraphic component = (SkeletonGraphic)target;
 					return component.IsValid;
 				}
 			}
@@ -100,7 +101,7 @@ namespace Spine.Unity.Editor {
 			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.");
 
-			var so = this.serializedObject;
+			SerializedObject so = this.serializedObject;
 			thisSkeletonGraphic = target as SkeletonGraphic;
 
 			// MaskableGraphic
@@ -145,12 +146,12 @@ namespace Spine.Unity.Editor {
 			if (UnityEngine.Event.current.type == EventType.Layout) {
 				if (forceReloadQueued) {
 					forceReloadQueued = false;
-					foreach (var c in targets) {
+					foreach (UnityEngine.Object c in targets) {
 						SpineEditorUtilities.ReloadSkeletonDataAssetAndComponent(c as SkeletonGraphic);
 					}
 				} 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) {
 							SpineEditorUtilities.ReinitializeComponent(component);
 							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."),
 							EditorStyles.miniButton, GUILayout.Width(100f))) {
 
-							foreach (var skeletonGraphic in targets) {
+							foreach (UnityEngine.Object skeletonGraphic in targets) {
 								((SkeletonGraphic)skeletonGraphic).TrimRenderers();
 							}
 						}
 						EditorGUILayout.EndHorizontal();
 
-						var blendModeMaterials = thisSkeletonGraphic.skeletonDataAsset.blendModeMaterials;
+						BlendModeMaterials blendModeMaterials = thisSkeletonGraphic.skeletonDataAsset.blendModeMaterials;
 						if (allowMultipleCanvasRenderers.boolValue == true && blendModeMaterials.RequiresBlendModeMaterials) {
 							using (new SpineInspectorUtility.IndentScope()) {
 								EditorGUILayout.BeginHorizontal();
@@ -274,7 +275,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.Space();
 			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"));
 				rect.x += EditorGUIUtility.labelWidth;
 				rect.width = 30f;
@@ -301,7 +302,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.BeginHorizontal(GUILayout.Height(EditorGUIUtility.singleLineHeight + 5));
 			EditorGUILayout.PrefixLabel("Match RectTransform with Mesh");
 			if (GUILayout.Button("Match", EditorStyles.miniButton, GUILayout.Width(65f))) {
-				foreach (var skeletonGraphic in targets) {
+				foreach (UnityEngine.Object skeletonGraphic in targets) {
 					MatchRectTransformWithBounds((SkeletonGraphic)skeletonGraphic);
 				}
 			}
@@ -310,8 +311,8 @@ namespace Spine.Unity.Editor {
 			if (TargetIsValid && !isInspectingPrefab) {
 				EditorGUILayout.Space();
 				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) {
 							component.gameObject.AddComponent<SkeletonUtility>();
 						}
@@ -326,8 +327,8 @@ namespace Spine.Unity.Editor {
 			}
 
 			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.LateUpdate();
 					SceneView.RepaintAll();
@@ -337,8 +338,8 @@ namespace Spine.Unity.Editor {
 		}
 
 		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())
 					return true;
 			}
@@ -346,8 +347,8 @@ namespace Spine.Unity.Editor {
 		}
 
 		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.multiplyMaterial = DefaultSkeletonGraphicMultiplyMaterial;
 				skeletonGraphic.screenMaterial = DefaultSkeletonGraphicScreenMaterial;
@@ -355,12 +356,12 @@ namespace Spine.Unity.Editor {
 		}
 
 		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);
 		}
 
 		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[];
 		}
 
@@ -370,8 +371,8 @@ namespace Spine.Unity.Editor {
 			bool multi = separatorSlotNames.serializedObject.isEditingMultipleObjects;
 			bool hasTerminalSlot = false;
 			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;
 				if (skeleton != null) {
 					for (int i = 0, n = separatorSlotNames.arraySize; i < n; i++) {
@@ -409,7 +410,7 @@ namespace Spine.Unity.Editor {
 		#region Menus
 		[MenuItem("CONTEXT/SkeletonGraphic/Match RectTransform with Mesh Bounds")]
 		static void MatchRectTransformWithBounds (MenuCommand command) {
-			var skeletonGraphic = (SkeletonGraphic)command.context;
+			SkeletonGraphic skeletonGraphic = (SkeletonGraphic)command.context;
 			MatchRectTransformWithBounds(skeletonGraphic);
 		}
 
@@ -420,13 +421,13 @@ namespace Spine.Unity.Editor {
 
 		[MenuItem("GameObject/Spine/SkeletonGraphic (UnityUI)", false, 15)]
 		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)
 				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);
 			EditorUtility.FocusProjectWindow();
 			Selection.activeObject = gameObject;
@@ -444,8 +445,8 @@ namespace Spine.Unity.Editor {
 
 		public static SkeletonGraphic InstantiateSkeletonGraphic (SkeletonDataAsset skeletonDataAsset, Skin skin = null) {
 			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;
 
 			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
@@ -472,15 +473,15 @@ namespace Spine.Unity.Editor {
 		}
 
 		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.additiveMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicAdditiveMaterial;
 			graphic.multiplyMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicMultiplyMaterial;
 			graphic.screenMaterial = SkeletonGraphicInspector.DefaultSkeletonGraphicScreenMaterial;
 
 #if HAS_CULL_TRANSPARENT_MESH
-			var canvasRenderer = go.GetComponent<CanvasRenderer>();
+			CanvasRenderer canvasRenderer = go.GetComponent<CanvasRenderer>();
 			canvasRenderer.cullTransparentMesh = false;
 #endif
 			return go;
@@ -503,13 +504,13 @@ namespace Spine.Unity.Editor {
 		}
 
 		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;
 
-			var firstAssetPath = AssetDatabase.GUIDToAssetPath(guids[0]);
+			string firstAssetPath = AssetDatabase.GUIDToAssetPath(guids[0]);
 			if (string.IsNullOrEmpty(firstAssetPath)) return null;
 
-			var firstMaterial = AssetDatabase.LoadAssetAtPath<Material>(firstAssetPath);
+			Material firstMaterial = AssetDatabase.LoadAssetAtPath<Material>(firstAssetPath);
 			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 () {
-			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 (component.GetComponent<SkeletonMecanimRootMotion>() == null) {
 						component.gameObject.AddComponent<SkeletonMecanimRootMotion>();
@@ -95,11 +95,11 @@ namespace Spine.Unity.Editor {
 			float widthMixColumn = 84;
 
 			using (new GUILayout.HorizontalScope()) {
-				var rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
+				Rect rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, EditorGUIUtility.singleLineHeight);
 				rect.width = widthLayerColumn;
 				EditorGUI.LabelField(rect, SpineInspectorUtility.TempContent("Mecanim Layer"), EditorStyles.boldLabel);
 
-				var savedIndent = EditorGUI.indentLevel;
+				int savedIndent = EditorGUI.indentLevel;
 				EditorGUI.indentLevel = 0;
 
 				rect.position += new Vector2(rect.width, 0);
@@ -115,14 +115,14 @@ namespace Spine.Unity.Editor {
 					using (new GUILayout.HorizontalScope()) {
 						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;
 						EditorGUI.PrefixLabel(rect, SpineInspectorUtility.TempContent(layerName));
 
-						var savedIndent = EditorGUI.indentLevel;
+						int savedIndent = EditorGUI.indentLevel;
 						EditorGUI.indentLevel = 0;
 
-						var mixMode = layerMixModes.GetArrayElementAtIndex(i);
+						SerializedProperty mixMode = layerMixModes.GetArrayElementAtIndex(i);
 						rect.position += new Vector2(rect.width, 0);
 						rect.width = widthMixColumn;
 						EditorGUI.PropertyField(rect, mixMode, GUIContent.none);
@@ -137,7 +137,7 @@ namespace Spine.Unity.Editor {
 			int maxLayerCount = 0;
 			int maxIndex = 0;
 			for (int i = 0; i < targets.Length; ++i) {
-				var skeletonMecanim = ((SkeletonMecanim)targets[i]);
+				SkeletonMecanim skeletonMecanim = ((SkeletonMecanim)targets[i]);
 				int count = skeletonMecanim.Translator.MecanimLayerCount;
 				if (count > maxLayerCount) {
 					maxLayerCount = count;
@@ -146,7 +146,7 @@ namespace Spine.Unity.Editor {
 			}
 			if (maxLayerCount == 0)
 				return new string[0];
-			var skeletonMecanimMaxLayers = ((SkeletonMecanim)targets[maxIndex]);
+			SkeletonMecanim skeletonMecanimMaxLayers = ((SkeletonMecanim)targets[maxIndex]);
 			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 maxIndex = 0;
 			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;
 				if (count > maxLayerCount) {
 					maxLayerCount = count;
@@ -67,7 +67,7 @@ namespace Spine.Unity.Editor {
 			}
 			if (maxLayerCount == 0)
 				return new string[0];
-			var skeletonMecanimMaxLayers = ((SkeletonMecanimRootMotion)targets[maxIndex]).SkeletonMecanim;
+			SkeletonMecanim skeletonMecanimMaxLayers = ((SkeletonMecanimRootMotion)targets[maxIndex]).SkeletonMecanim;
 			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
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials")]
 		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");
 		}
 
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials", true)]
 		static bool AddSkeletonRendererCustomMaterials_Validate (MenuCommand menuCommand) {
-			var skeletonRenderer = (SkeletonRenderer)menuCommand.context;
+			SkeletonRenderer skeletonRenderer = (SkeletonRenderer)menuCommand.context;
 			return (skeletonRenderer.GetComponent<SkeletonRendererCustomMaterials>() == null);
 		}
 		#endregion
@@ -76,7 +76,7 @@ namespace Spine.Unity.Editor {
 
 		public override void OnInspectorGUI () {
 			component = (SkeletonRendererCustomMaterials)target;
-			var skeletonRenderer = component.skeletonRenderer;
+			SkeletonRenderer skeletonRenderer = component.skeletonRenderer;
 
 			// Draw the default inspector
 			DrawDefaultInspector();

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

@@ -45,6 +45,7 @@
 #define HAS_ON_POSTPROCESS_PREFAB
 #endif
 
+using System.Reflection;
 using UnityEditor;
 using UnityEngine;
 
@@ -94,14 +95,14 @@ namespace Spine.Unity.Editor {
 		protected bool TargetIsValid {
 			get {
 				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)
 							return false;
 					}
 					return true;
 				} else {
-					var component = (SkeletonRenderer)target;
+					SkeletonRenderer component = (SkeletonRenderer)target;
 					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.");
 			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");
 			initialSkinName = so.FindProperty("initialSkinName");
 			initialFlipX = so.FindProperty("initialFlipX");
@@ -171,16 +172,16 @@ namespace Spine.Unity.Editor {
 		}
 
 		public void OnSceneGUI () {
-			var skeletonRenderer = (SkeletonRenderer)target;
+			SkeletonRenderer skeletonRenderer = (SkeletonRenderer)target;
 			if (loadingFailed)
 				return;
 
-			var skeleton = skeletonRenderer.Skeleton;
+			Skeleton skeleton = skeletonRenderer.Skeleton;
 			if (skeleton == null) {
 				loadingFailed = true;
 				return;
 			}
-			var transform = skeletonRenderer.transform;
+			Transform transform = skeletonRenderer.transform;
 			if (skeleton == null) return;
 
 			SpineHandles.DrawBones(transform, skeleton);
@@ -193,7 +194,7 @@ namespace Spine.Unity.Editor {
 			if (serializedObject.ApplyModifiedProperties() || SpineInspectorUtility.UndoRedoPerformed(Event.current) ||
 				AreAnyMaskMaterialsMissing()) {
 				if (!Application.isPlaying) {
-					foreach (var o in targets)
+					foreach (UnityEngine.Object o in targets)
 						SpineEditorUtilities.ReinitializeComponent((SkeletonRenderer)o);
 					SceneView.RepaintAll();
 				}
@@ -212,12 +213,12 @@ namespace Spine.Unity.Editor {
 			if (Event.current.type == EventType.Layout) {
 				if (forceReloadQueued) {
 					forceReloadQueued = false;
-					foreach (var c in targets) {
+					foreach (UnityEngine.Object c in targets) {
 						SpineEditorUtilities.ReloadSkeletonDataAssetAndComponent(c as SkeletonRenderer);
 					}
 				} 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) {
 							SpineEditorUtilities.ReinitializeComponent(component);
 							if (!component.valid) continue;
@@ -228,36 +229,36 @@ namespace Spine.Unity.Editor {
 #if BUILT_IN_SPRITE_MASK_COMPONENT
 				if (setMaskNoneMaterialsQueued) {
 					setMaskNoneMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.None);
 				}
 				if (setInsideMaskMaterialsQueued) {
 					setInsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleInsideMask);
 				}
 				if (setOutsideMaskMaterialsQueued) {
 					setOutsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorSetMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleOutsideMask);
 				}
 
 				if (deleteInsideMaskMaterialsQueued) {
 					deleteInsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorDeleteMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleInsideMask);
 				}
 				if (deleteOutsideMaskMaterialsQueued) {
 					deleteOutsideMaskMaterialsQueued = false;
-					foreach (var c in targets)
+					foreach (UnityEngine.Object c in targets)
 						EditorDeleteMaskMaterials(c as SkeletonRenderer, SpriteMaskInteraction.VisibleOutsideMask);
 				}
 #endif
 
 #if NO_PREFAB_MESH
 				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>();
 						if (meshFilter != null && meshFilter.sharedMesh != null)
 							meshFilter.sharedMesh = null;
@@ -268,7 +269,7 @@ namespace Spine.Unity.Editor {
 
 			bool valid = TargetIsValid;
 
-			foreach (var o in targets)
+			foreach (UnityEngine.Object o in targets)
 				ApplyModifiedMeshParameters(o as SkeletonRenderer);
 
 			// Fields.
@@ -282,7 +283,7 @@ namespace Spine.Unity.Editor {
 				if (valid) EditorGUILayout.PropertyField(initialSkinName, SpineInspectorUtility.TempContent("Initial Skin"));
 
 			} else {
-				var component = (SkeletonRenderer)target;
+				SkeletonRenderer component = (SkeletonRenderer)target;
 
 				using (new EditorGUILayout.HorizontalScope(EditorStyles.helpBox)) {
 					SpineInspectorUtility.PropertyFieldFitLabel(skeletonDataAsset, SkeletonDataAssetLabel);
@@ -413,13 +414,13 @@ namespace Spine.Unity.Editor {
 								// Support multi-edit SkeletonUtility button.
 								//	EditorGUILayout.Space();
 								//	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)
 								//			component.gameObject.AddComponent<SkeletonUtility>();
 								//	}
 							} else {
-								var component = (Component)target;
+								Component component = (Component)target;
 								if (component.GetComponent<SkeletonUtility>() == null) {
 									if (SpineInspectorUtility.CenteredButton(SkeletonUtilityButtonContent, 21, true, 200f))
 										component.gameObject.AddComponent<SkeletonUtility>();
@@ -459,8 +460,8 @@ namespace Spine.Unity.Editor {
 
 		public static void SkeletonRootMotionParameter (Object[] targets) {
 			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) {
 					++rootMotionComponentCount;
 				}
@@ -473,8 +474,8 @@ namespace Spine.Unity.Editor {
 
 				if (!allHaveRootMotion) {
 					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) {
 								component.gameObject.AddComponent<SkeletonRootMotion>();
 							}
@@ -483,9 +484,9 @@ namespace Spine.Unity.Editor {
 				}
 				if (anyHaveRootMotion) {
 					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) {
 								DestroyImmediate(rootMotionComponent);
 							}
@@ -496,12 +497,12 @@ namespace Spine.Unity.Editor {
 		}
 
 		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);
 		}
 
 		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[];
 		}
 
@@ -509,8 +510,8 @@ namespace Spine.Unity.Editor {
 			bool multi = separatorSlotNames.serializedObject.isEditingMultipleObjects;
 			bool hasTerminalSlot = false;
 			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;
 				if (skeleton != null) {
 					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) {
 				bool mismatchDetected = false;
 				string newSkinName = initialSkinName.stringValue;
-				foreach (var o in targets) {
+				foreach (UnityEngine.Object o in targets) {
 					mismatchDetected |= UpdateIfSkinMismatch((SkeletonRenderer)o, newSkinName);
 				}
 
@@ -593,7 +594,7 @@ namespace Spine.Unity.Editor {
 		static bool UpdateIfSkinMismatch (SkeletonRenderer skeletonRenderer, string componentSkinName) {
 			if (!skeletonRenderer.valid || skeletonRenderer.EditorSkipSkinSync) return false;
 
-			var skin = skeletonRenderer.Skeleton.Skin;
+			Skin skin = skeletonRenderer.Skeleton.Skin;
 			string skeletonSkinName = skin != null ? skin.Name : null;
 			bool defaultCase = skin == null && string.IsNullOrEmpty(componentSkinName);
 			bool fieldMatchesSkin = defaultCase || string.Equals(componentSkinName, skeletonSkinName, System.StringComparison.Ordinal);
@@ -619,8 +620,8 @@ namespace Spine.Unity.Editor {
 
 		bool AreAnyMaskMaterialsMissing () {
 #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)
 					continue;
 				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 () {
 			bool usesRigidbodyPhysics = rigidBody.objectReferenceValue != null || rigidBody2D.objectReferenceValue != null;
 			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) {
 					string warningMessage = "Skeleton component uses 'Advanced - Animation Update' mode 'In Update'.\n" +
 						"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 (utilityBone.bone == null) return;
 
-			var skeleton = utilityBone.bone.Skeleton;
+			Skeleton skeleton = utilityBone.bone.Skeleton;
 			int slotCount = skeleton.Slots.Count;
 			Skin skin = skeleton.Skin;
 			if (skeleton.Skin == null)
@@ -94,13 +94,13 @@ namespace Spine.Unity.Editor {
 			for (int i = 0; i < slotCount; i++) {
 				Slot slot = skeletonUtility.Skeleton.Slots.Items[i];
 				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;
 					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)
 							boundingBoxes.Add(boundingBoxAttachment);
 					}
@@ -118,7 +118,7 @@ namespace Spine.Unity.Editor {
 			} else {
 				int boneCount = 0;
 				foreach (Object o in Selection.objects) {
-					var go = o as GameObject;
+					GameObject go = o as GameObject;
 					if (go != null) {
 						SkeletonUtilityBone sub = go.GetComponent<SkeletonUtilityBone>();
 						if (sub != null) {
@@ -198,29 +198,29 @@ namespace Spine.Unity.Editor {
 			using (new EditorGUI.DisabledGroupScope(multiObject || boundingBoxTable.Count == 0)) {
 				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;
-					var boundingBoxes = entry.Value;
+					List<BoundingBoxAttachment> boundingBoxes = entry.Value;
 
 					EditorGUI.indentLevel++;
 					EditorGUILayout.LabelField(slot.Data.Name);
 					EditorGUI.indentLevel++;
 					{
-						foreach (var box in boundingBoxes) {
+						foreach (BoundingBoxAttachment box in boundingBoxes) {
 							using (new GUILayout.HorizontalScope()) {
 								GUILayout.Space(30);
 								string buttonLabel = box.IsWeighted() ? box.Name + " (!)" : box.Name;
 								if (GUILayout.Button(buttonLabel, GUILayout.Width(200))) {
 									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) {
-										var originalCollider = bbTransform.GetComponent<PolygonCollider2D>();
+										PolygonCollider2D originalCollider = bbTransform.GetComponent<PolygonCollider2D>();
 										if (originalCollider != null)
 											SkeletonUtility.SetColliderPointsLocal(originalCollider, slot, box);
 										else
 											SkeletonUtility.AddBoundingBoxAsComponent(box, slot, bbTransform.gameObject);
 									} else {
-										var newPolygonCollider = SkeletonUtility.AddBoundingBoxGameObject(null, box, slot, utilityBone.transform);
+										PolygonCollider2D newPolygonCollider = SkeletonUtility.AddBoundingBoxGameObject(null, box, slot, utilityBone.transform);
 										bbTransform = newPolygonCollider.transform;
 									}
 									EditorGUIUtility.PingObject(bbTransform);
@@ -240,7 +240,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		static void BoneSelectorContextMenu (string current, ExposedList<Bone> bones, string topValue, GenericMenu.MenuFunction2 callback) {
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 
 			if (topValue != "")
 				menu.AddItem(new GUIContent(topValue), current == topValue, callback, null);
@@ -256,7 +256,7 @@ namespace Spine.Unity.Editor {
 				boneName.stringValue = "";
 				serializedObject.ApplyModifiedProperties();
 			} else {
-				var bone = (Bone)obj;
+				Bone bone = (Bone)obj;
 				boneName.stringValue = bone.Data.Name;
 				serializedObject.ApplyModifiedProperties();
 				utilityBone.Reset();
@@ -266,14 +266,14 @@ namespace Spine.Unity.Editor {
 		void SpawnChildBoneSelected (object obj) {
 			if (obj == null) {
 				// 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);
 					SkeletonUtilityBone[] newUtilityBones = go.GetComponentsInChildren<SkeletonUtilityBone>();
 					foreach (SkeletonUtilityBone utilBone in newUtilityBones)
 						SkeletonUtilityInspector.AttachIcon(utilBone);
 				}
 			} else {
-				var bone = (Bone)obj;
+				Bone bone = (Bone)obj;
 				GameObject go = skeletonUtility.SpawnBone(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale);
 				SkeletonUtilityInspector.AttachIcon(go.GetComponent<SkeletonUtilityBone>());
 				Selection.activeGameObject = go;
@@ -297,13 +297,13 @@ namespace Spine.Unity.Editor {
 			if (utilityBone.bone != null && utilityBone.bone.Children.Count == 0)
 				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;
 		}
 
 		void CreateHingeChain2D () {
-			var kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
+			SkeletonUtilityBone kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
 			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");
 				return;
@@ -318,7 +318,7 @@ namespace Spine.Unity.Editor {
 			kinematicParentUtilityBone.position = kinematicParentUtilityBone.rotation = kinematicParentUtilityBone.scale = kinematicParentUtilityBone.zPosition = true;
 
 			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.skeletonGraphic = skeletonUtility.skeletonGraphic;
 
@@ -328,13 +328,13 @@ namespace Spine.Unity.Editor {
 			normalChainParentObject.transform.SetParent(commonParentObject.transform);
 			commonParentActivateOnFlip.activeOnNormalX = normalChainParentObject;
 
-			//var followRotationComponent = normalChainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
+			//FollowSkeletonUtilityRootRotation followRotationComponent = normalChainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
 			//followRotationComponent.reference = skeletonUtility.boneRoot;
 
 			// Follower Kinematic Rigidbody
 			GameObject followerKinematicObject = new GameObject(kinematicParentUtilityBone.name + " Follower");
 			followerKinematicObject.transform.parent = normalChainParentObject.transform;
-			var followerRigidbody = followerKinematicObject.AddComponent<Rigidbody2D>();
+			Rigidbody2D followerRigidbody = followerKinematicObject.AddComponent<Rigidbody2D>();
 			followerRigidbody.mass = mass;
 			followerRigidbody.isKinematic = true;
 			followerKinematicObject.AddComponent<FollowLocationRigidbody2D>().reference = kinematicParentUtilityBone.transform;
@@ -342,10 +342,10 @@ namespace Spine.Unity.Editor {
 			followerKinematicObject.transform.rotation = kinematicParentUtilityBone.transform.rotation;
 
 			// 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) {
-				var childBone = utilityBones[i];
+				SkeletonUtilityBone childBone = utilityBones[i];
 				mass *= 0.75f;
 				childBone.parentReference = (i == 0) ? kinematicParentUtilityBone.transform : childBoneParentReference;
 				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;
 
-			var followerKinematicObject = mirroredChain.GetComponentInChildren<FollowLocationRigidbody2D>();
+			FollowLocationRigidbody2D followerKinematicObject = mirroredChain.GetComponentInChildren<FollowLocationRigidbody2D>();
 			followerKinematicObject.followFlippedX = true;
 			FlipBone2DHorizontal(followerKinematicObject.transform, skeletonUtilityRoot);
 
-			var childBoneJoints = mirroredChain.GetComponentsInChildren<HingeJoint2D>();
+			HingeJoint2D[] childBoneJoints = mirroredChain.GetComponentsInChildren<HingeJoint2D>();
 			Transform prevRotatedChild = null;
 			Transform parentTransformForAngles = followerKinematicObject.transform;
 			for (int i = 0; i < childBoneJoints.Length; ++i) {
-				var joint = childBoneJoints[i];
+				HingeJoint2D joint = childBoneJoints[i];
 				FlipBone2DHorizontal(joint.transform, skeletonUtilityRoot);
 				ApplyJoint2DAngleLimits(joint, rotationLimit, parentTransformForAngles, joint.transform);
 
 				GameObject rotatedChild = GameObject.Instantiate(joint.gameObject, joint.transform, true);
 				rotatedChild.name = joint.name + " rotated";
-				var rotationEulerAngles = rotatedChild.transform.localEulerAngles;
+				Vector3 rotationEulerAngles = rotatedChild.transform.localEulerAngles;
 				rotationEulerAngles.x = 180;
 				rotatedChild.transform.localEulerAngles = rotationEulerAngles;
 				DestroyImmediate(rotatedChild.GetComponent<HingeJoint2D>());
@@ -422,7 +422,7 @@ namespace Spine.Unity.Editor {
 				DestroyImmediate(joint.gameObject.GetComponent<SkeletonUtilityBone>());
 
 				if (i > 0) {
-					var utilityBone = rotatedChild.GetComponent<SkeletonUtilityBone>();
+					SkeletonUtilityBone utilityBone = rotatedChild.GetComponent<SkeletonUtilityBone>();
 					utilityBone.parentReference = prevRotatedChild;
 				}
 				prevRotatedChild = rotatedChild.transform;
@@ -445,7 +445,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		void CreateHingeChain () {
-			var kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
+			SkeletonUtilityBone kinematicParentUtilityBone = utilityBone.transform.parent.GetComponent<SkeletonUtilityBone>();
 			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");
 				return;
@@ -459,13 +459,13 @@ namespace Spine.Unity.Editor {
 			// HingeChain Parent
 			// 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);
-			var followRotationComponent = chainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
+			FollowSkeletonUtilityRootRotation followRotationComponent = chainParentObject.AddComponent<FollowSkeletonUtilityRootRotation>();
 			followRotationComponent.reference = skeletonUtility.boneRoot;
 
 			// Follower Kinematic Rigidbody
 			GameObject followerKinematicObject = new GameObject(kinematicParentUtilityBone.name + " Follower");
 			followerKinematicObject.transform.parent = chainParentObject.transform;
-			var followerRigidbody = followerKinematicObject.AddComponent<Rigidbody>();
+			Rigidbody followerRigidbody = followerKinematicObject.AddComponent<Rigidbody>();
 			followerRigidbody.mass = 10;
 			followerRigidbody.isKinematic = true;
 			followerKinematicObject.AddComponent<FollowLocationRigidbody>().reference = kinematicParentUtilityBone.transform;
@@ -473,9 +473,9 @@ namespace Spine.Unity.Editor {
 			followerKinematicObject.transform.rotation = kinematicParentUtilityBone.transform.rotation;
 
 			// 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.transform.SetParent(chainParentObject.transform, true); // we need a flat hierarchy of all Joint objects in Unity.
 				AttachRigidbodyAndCollider(childBone);
@@ -523,12 +523,12 @@ namespace Spine.Unity.Editor {
 		static void AttachRigidbodyAndCollider2D (SkeletonUtilityBone utilBone, bool enableCollider = false) {
 			if (utilBone.GetComponent<Collider2D>() == null) {
 				if (utilBone.bone.Data.Length == 0) {
-					var sphere = utilBone.gameObject.AddComponent<CircleCollider2D>();
+					CircleCollider2D sphere = utilBone.gameObject.AddComponent<CircleCollider2D>();
 					sphere.radius = 0.1f;
 					sphere.enabled = enableCollider;
 				} else {
 					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.offset = new Vector3(length / 2f, 0, 0);
 					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 () {
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 
 			menu.AddItem(new GUIContent("Follow all bones"), false, SpawnFollowHierarchy);
 			menu.AddItem(new GUIContent("Follow (Root Only)"), false, SpawnFollowHierarchyRootOnly);
@@ -161,8 +161,8 @@ namespace Spine.Unity.Editor {
 
 		static void AttachIconsToChildren (Transform root) {
 			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);
 			}
 		}

+ 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.BeginChangeCheck();
 
-			var origFontStyle = EditorStyles.label.fontStyle;
+			FontStyle origFontStyle = EditorStyles.label.fontStyle;
 			EditorStyles.label.fontStyle = FontStyle.Bold;
 			isOutlineEnabled = EditorGUILayout.Toggle(_EnableOutlineText, isOutlineEnabled);
 			EditorStyles.label.fontStyle = origFontStyle;
@@ -144,7 +144,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
 				}
 			}
 		} else {
-			var origFontStyle = EditorStyles.label.fontStyle;
+			FontStyle origFontStyle = EditorStyles.label.fontStyle;
 			EditorStyles.label.fontStyle = FontStyle.Bold;
 			EditorGUILayout.LabelField(_EnableOutlineText);
 			EditorStyles.label.fontStyle = origFontStyle;
@@ -174,7 +174,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
 
 	void SwitchShaderToOutlineSettings (Material material, bool enableOutline) {
 
-		var shaderName = material.shader.name;
+		string shaderName = material.shader.name;
 		bool isSetToOutlineShader = shaderName.Contains(ShaderOutlineNamePrefix);
 		if (isSetToOutlineShader && !enableOutline) {
 			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();
-		var culling = (eCulling)Mathf.RoundToInt(_culling.floatValue);
+		eCulling culling = (eCulling)Mathf.RoundToInt(_culling.floatValue);
 		EditorGUI.showMixedValue = _culling.hasMixedValue;
 		culling = (eCulling)EditorGUILayout.Popup(_cullingModeText, (int)culling, _cullingModeOptions);
 		if (EditorGUI.EndChangeCheck()) {
@@ -885,7 +885,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
 	#region Private Functions
 
 	void RenderMeshInfoBox () {
-		var material = (Material)_materialEditor.target;
+		Material material = (Material)_materialEditor.target;
 		bool requiresNormals = _fixedNormal != null && GetMaterialNormalsMode(material) == eNormalsMode.MeshNormals;
 		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);
 
 			if (dataField != null) {
-				var objectReferenceValue = dataField.objectReferenceValue;
+				UnityEngine.Object objectReferenceValue = dataField.objectReferenceValue;
 				if (objectReferenceValue is SkeletonDataAsset) {
 					skeletonDataAsset = (SkeletonDataAsset)objectReferenceValue;
 				} else if (objectReferenceValue is IHasSkeletonDataAsset) {
-					var hasSkeletonDataAsset = (IHasSkeletonDataAsset)objectReferenceValue;
+					IHasSkeletonDataAsset hasSkeletonDataAsset = (IHasSkeletonDataAsset)objectReferenceValue;
 					if (hasSkeletonDataAsset != null)
 						skeletonDataAsset = hasSkeletonDataAsset.SkeletonDataAsset;
 				} else if (objectReferenceValue != null) {
@@ -119,11 +119,11 @@ namespace Spine.Unity.Editor {
 				}
 
 			} else {
-				var targetObject = property.serializedObject.targetObject;
+				UnityEngine.Object targetObject = property.serializedObject.targetObject;
 
 				IHasSkeletonDataAsset hasSkeletonDataAsset = targetObject as IHasSkeletonDataAsset;
 				if (hasSkeletonDataAsset == null) {
-					var component = targetObject as Component;
+					Component component = targetObject as Component;
 					if (component != null)
 						hasSkeletonDataAsset = component.GetComponentInChildren(typeof(IHasSkeletonDataAsset)) as IHasSkeletonDataAsset;
 				}
@@ -154,14 +154,14 @@ namespace Spine.Unity.Editor {
 		}
 
 		public ISkeletonComponent GetTargetSkeletonComponent (SerializedProperty property) {
-			var dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
+			SerializedProperty dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
 
 			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.
 					return skeletonComponent;
 			} else {
-				var component = property.serializedObject.targetObject as Component;
+				Component component = property.serializedObject.targetObject as Component;
 				if (component != null)
 					return component.GetComponentInChildren(typeof(ISkeletonComponent)) as ISkeletonComponent;
 			}
@@ -173,7 +173,7 @@ namespace Spine.Unity.Editor {
 			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
 			if (data == null) return;
 
-			var menu = new GenericMenu();
+			GenericMenu menu = new GenericMenu();
 			PopulateMenu(menu, property, this.TargetAttribute, data);
 			menu.ShowAsContext();
 		}
@@ -181,8 +181,8 @@ namespace Spine.Unity.Editor {
 		protected abstract void PopulateMenu (GenericMenu menu, SerializedProperty property, T targetAttribute, SkeletonData data);
 
 		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.
 			serializedProperty.stringValue = clickedItem.stringValue;
 			serializedProperty.serializedObject.ApplyModifiedProperties();
@@ -214,14 +214,14 @@ namespace Spine.Unity.Editor {
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 
 					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);
 						}
 
 						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) {
 								string menuLabel = bbAttachment.IsWeighted() ? name + " (!)" : name;
 								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 (outputMenuItems == null) return;
 
-			var skins = data.Skins;
+			ExposedList<Skin> skins = data.Skins;
 
 			outputNames.Clear();
 			outputMenuItems.Clear();
 
-			var icon = SpineEditorUtilities.Icons.skin;
+			Texture2D icon = SpineEditorUtilities.Icons.skin;
 
 			if (includeNone) {
 				outputNames.Add("");
 				outputMenuItems.Add(new GUIContent(NoneStringConstant, icon));
 			}
 
-			foreach (var s in skins) {
+			foreach (Skin s in skins) {
 				string skinName = s.Name;
 				outputNames.Add(skinName);
 				outputMenuItems.Add(new GUIContent(skinName, icon));
@@ -311,7 +311,7 @@ namespace Spine.Unity.Editor {
 			if (outputNames == null) return;
 			if (outputMenuItems == null) return;
 
-			var animations = data.Animations;
+			ExposedList<Animation> animations = data.Animations;
 
 			outputNames.Clear();
 			outputMenuItems.Clear();
@@ -321,7 +321,7 @@ namespace Spine.Unity.Editor {
 				outputMenuItems.Add(new GUIContent(NoneStringConstant, SpineEditorUtilities.Icons.animation));
 			}
 
-			foreach (var a in animations) {
+			foreach (Animation a in animations) {
 				string animationName = a.Name;
 				outputNames.Add(animationName);
 				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) {
-			var animations = skeletonDataAsset.GetAnimationStateData().SkeletonData.Animations;
+			ExposedList<Animation> animations = skeletonDataAsset.GetAnimationStateData().SkeletonData.Animations;
 
 			if (TargetAttribute.includeNone)
 				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) {
 			if (data == null) return;
 
-			var animations = data.Events;
+			ExposedList<EventData> animations = data.Events;
 
 			eventNames.Clear();
 			menuItems.Clear();
@@ -365,7 +365,7 @@ namespace Spine.Unity.Editor {
 				menuItems.Add(new GUIContent(NoneStringConstant, SpineEditorUtilities.Icons.userEvent));
 			}
 
-			foreach (var a in animations) {
+			foreach (EventData a in animations) {
 				string animationName = a.Name;
 				eventNames.Add(animationName);
 				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) {
-			var events = skeletonDataAsset.GetSkeletonData(false).Events;
+			ExposedList<EventData> events = skeletonDataAsset.GetSkeletonData(false).Events;
 
 			if (TargetAttribute.includeNone)
 				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++) {
-				var eventObject = events.Items[i];
+				EventData eventObject = events.Items[i];
 				string name = eventObject.Name;
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 					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) {
-			var constraints = skeletonDataAsset.GetSkeletonData(false).IkConstraints;
+			ExposedList<IkConstraintData> constraints = skeletonDataAsset.GetSkeletonData(false).IkConstraints;
 
 			if (TargetAttribute.includeNone)
 				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) {
-			var constraints = skeletonDataAsset.GetSkeletonData(false).TransformConstraints;
+			ExposedList<TransformConstraintData> constraints = skeletonDataAsset.GetSkeletonData(false).TransformConstraints;
 
 			if (TargetAttribute.includeNone)
 				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) {
-			var constraints = skeletonDataAsset.GetSkeletonData(false).PathConstraints;
+			ExposedList<PathConstraintData> constraints = skeletonDataAsset.GetSkeletonData(false).PathConstraints;
 
 			if (TargetAttribute.includeNone)
 				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) {
 			ISkeletonComponent skeletonComponent = GetTargetSkeletonComponent(property);
-			var validSkins = new List<Skin>();
+			List<Skin> validSkins = new List<Skin>();
 
 			if (skeletonComponent != null && targetAttribute.currentSkinOnly) {
 				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);
 
 				currentSkin = currentSkin ?? skeletonComponent.Skeleton.Skin;
@@ -488,8 +488,8 @@ namespace Spine.Unity.Editor {
 					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 = "";
 
 			if (skeletonComponent != null && targetAttribute.currentSkinOnly)
@@ -505,7 +505,7 @@ namespace Spine.Unity.Editor {
 			}
 
 			Skin defaultSkin = data.Skins.Items[0];
-			var slotProperty = property.FindBaseOrSiblingProperty(TargetAttribute.slotField);
+			SerializedProperty slotProperty = property.FindBaseOrSiblingProperty(TargetAttribute.slotField);
 
 			string slotMatch = "";
 			if (slotProperty != null) {
@@ -526,19 +526,19 @@ namespace Spine.Unity.Editor {
 					attachmentNames.Clear();
 					placeholderNames.Clear();
 
-					var skinEntries = new List<Skin.SkinEntry>();
+					List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 					skin.GetAttachments(i, skinEntries);
-					foreach (var entry in skinEntries) {
+					foreach (Skin.SkinEntry entry in skinEntries) {
 						attachmentNames.Add(entry.Name);
 					}
 
 					if (skin != defaultSkin) {
-						foreach (var entry in skinEntries) {
+						foreach (Skin.SkinEntry entry in skinEntries) {
 							placeholderNames.Add(entry.Name);
 						}
 						skinEntries.Clear();
 						defaultSkin.GetAttachments(i, skinEntries);
-						foreach (var entry in skinEntries) {
+						foreach (Skin.SkinEntry entry in skinEntries) {
 							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));
 
 			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;
 				if (name.StartsWith(targetAttribute.startsWith, StringComparison.Ordinal)) {
 					// jointName = "root/hip/bone" to show a hierarchial tree.
 					string jointName = name;
-					var iterator = bone;
+					BoneData iterator = bone;
 					while ((iterator = iterator.Parent) != null)
 						jointName = string.Format("{0}/{1}", iterator.Name, jointName);
 
@@ -649,7 +649,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		static void HandleSelect (object val) {
-			var pair = (SpineDrawerValuePair)val;
+			SpineDrawerValuePair pair = (SpineDrawerValuePair)val;
 			pair.property.stringValue = pair.stringValue;
 			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"))
 				return new List<string>();
 
-			var skinsList = root["skins"] as List<object>;
+			List<object> skinsList = root["skins"] as List<object>;
 			if (skinsList == null)
 				return new List<string>();
 
@@ -271,7 +271,7 @@ namespace Spine.Unity.Editor {
 			}
 
 			public RegionAttachment NewRegionAttachment (Skin skin, string name, string path, Sequence sequence) {
-				var regionAttachment = new RegionAttachment(name);
+				RegionAttachment regionAttachment = new RegionAttachment(name);
 				if (sequence != null)
 					LoadSequence(path, sequence);
 				else {
@@ -282,7 +282,7 @@ namespace Spine.Unity.Editor {
 			}
 
 			public MeshAttachment NewMeshAttachment (Skin skin, string name, string path, Sequence sequence) {
-				var meshAttachment = new MeshAttachment(name);
+				MeshAttachment meshAttachment = new MeshAttachment(name);
 				if (sequence != null)
 					LoadSequence(path, sequence);
 				else {
@@ -325,9 +325,9 @@ namespace Spine.Unity.Editor {
 		public static void ImportSpineContent (string[] imported, List<string> texturesWithoutMetaFile,
 			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;
 
 			foreach (string str in imported) {
@@ -352,7 +352,7 @@ namespace Spine.Unity.Editor {
 					imagePaths.Add(str);
 					break;
 				case ".json": {
-					var jsonAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
+					TextAsset jsonAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
 					string problemDescription = null;
 					if (jsonAsset != null && IsSpineData(jsonAsset, out compatibilityProblemInfo, ref problemDescription))
 						skeletonPaths.Add(new PathAndProblemInfo(str, compatibilityProblemInfo, problemDescription));
@@ -362,7 +362,7 @@ namespace Spine.Unity.Editor {
 				}
 				case ".bytes": {
 					if (str.ToLower().EndsWith(".skel.bytes", System.StringComparison.Ordinal)) {
-						var binaryAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
+						TextAsset binaryAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(str);
 						string problemDescription = null;
 						if (IsSpineData(binaryAsset, out compatibilityProblemInfo, ref problemDescription))
 							skeletonPaths.Add(new PathAndProblemInfo(str, compatibilityProblemInfo, problemDescription));
@@ -377,7 +377,7 @@ namespace Spine.Unity.Editor {
 			AddDependentAtlasIfImageChanged(atlasPaths, imagePaths);
 
 			// Import atlases first.
-			var newAtlases = new List<AtlasAssetBase>();
+			List<AtlasAssetBase> newAtlases = new List<AtlasAssetBase>();
 			foreach (string ap in atlasPaths) {
 #if PROBLEMATIC_PACKAGE_ASSET_MODIFICATION
 				if (ap.StartsWith("Packages"))
@@ -391,9 +391,9 @@ namespace Spine.Unity.Editor {
 
 			// Import skeletons and match them with atlases.
 			bool abortSkeletonImport = false;
-			foreach (var skeletonPathEntry in skeletonPaths) {
+			foreach (PathAndProblemInfo skeletonPathEntry in skeletonPaths) {
 				string skeletonPath = skeletonPathEntry.path;
-				var compatibilityProblems = skeletonPathEntry.compatibilityProblems;
+				CompatibilityProblemInfo compatibilityProblems = skeletonPathEntry.compatibilityProblems;
 				string otherProblemDescription = skeletonPathEntry.otherProblemDescription;
 #if PROBLEMATIC_PACKAGE_ASSET_MODIFICATION
 				if (skeletonPath.StartsWith("Packages"))
@@ -404,7 +404,7 @@ namespace Spine.Unity.Editor {
 					continue;
 				}
 
-				var loadedAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath);
+				TextAsset loadedAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath);
 				if (compatibilityProblems != null) {
 					IngestIncompatibleSpineProject(loadedAsset, compatibilityProblems);
 					continue;
@@ -456,7 +456,7 @@ namespace Spine.Unity.Editor {
 
 			if (atlasPaths.Count > 0 || imagePaths.Count > 0 || skeletonPaths.Count > 0) {
 				SkeletonDataAssetInspector[] skeletonDataInspectors = Resources.FindObjectsOfTypeAll<SkeletonDataAssetInspector>();
-				foreach (var inspector in skeletonDataInspectors) {
+				foreach (SkeletonDataAssetInspector inspector in skeletonDataInspectors) {
 					inspector.UpdateSkeletonData();
 				}
 			}
@@ -467,11 +467,11 @@ namespace Spine.Unity.Editor {
 			// have their skeletonGraphic.skeletonDataAsset reference corrupted
 			// by the instance of the ScriptableObject being destroyed but still assigned.
 			// 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) {
-					var skeletonGraphicID = skeletonGraphic.GetInstanceID();
+					int skeletonGraphicID = skeletonGraphic.GetInstanceID();
 					if (SpineEditorUtilities.DataReloadHandler.savedSkeletonDataAssetAtSKeletonGraphicID.ContainsKey(skeletonGraphicID)) {
 						string assetPath = SpineEditorUtilities.DataReloadHandler.savedSkeletonDataAssetAtSKeletonGraphicID[skeletonGraphicID];
 						skeletonGraphic.skeletonDataAsset = (SkeletonDataAsset)AssetDatabase.LoadAssetAtPath<SkeletonDataAsset>(assetPath);
@@ -481,7 +481,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		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");
 				if (!System.IO.File.Exists(atlasPath))
 					continue;
@@ -493,7 +493,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		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 skeletonPathBinary = atlasPath.Replace(".atlas.txt", ".skel.bytes");
 				string usedSkeletonPath = System.IO.File.Exists(skeletonPathJson) ? skeletonPathJson :
@@ -517,10 +517,10 @@ namespace Spine.Unity.Editor {
 			DirectoryInfo dirInfo = new DirectoryInfo(dir);
 			FileInfo[] files = dirInfo.GetFiles("*.asset");
 
-			foreach (var f in files) {
+			foreach (FileInfo f in files) {
 				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.skeletonJSON == textAsset) {
 						if (Selection.activeObject == skeletonDataAsset)
@@ -583,7 +583,7 @@ namespace Spine.Unity.Editor {
 			FileInfo[] assetInfoArr = dir.GetFiles("*.asset");
 
 			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("\\", "/");
 				Object obj = AssetDatabase.LoadAssetAtPath(assetRelativePath, typeof(AtlasAssetBase));
 				if (obj != null)
@@ -621,11 +621,11 @@ namespace Spine.Unity.Editor {
 			List<string> pageFiles = new List<string>();
 			Atlas atlas = atlasAsset.GetAtlas(onlyMetaData: true);
 			if (atlas != null) {
-				foreach (var page in atlas.Pages)
+				foreach (AtlasPage page in atlas.Pages)
 					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++) {
 				string texturePath = assetPath + "/" + pageFiles[i];
@@ -692,7 +692,7 @@ namespace Spine.Unity.Editor {
 			atlas = atlasAsset.GetAtlas(onlyMetaData: false);
 			if (atlas != null) {
 				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 atlasAssetDirPath = Path.GetDirectoryName(atlasAssetPath).Replace('\\', '/');
 				string bakedDirPath = Path.Combine(atlasAssetDirPath, atlasAsset.name);
@@ -717,7 +717,7 @@ namespace Spine.Unity.Editor {
 			protectFromStackGarbageCollection.Remove(atlasAsset);
 			// note: at Asset Pipeline V2 this LoadAssetAtPath of the just created
 			// 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;
 		}
 
@@ -831,7 +831,7 @@ namespace Spine.Unity.Editor {
 			atlasAsset.spriteAtlasFile = spriteAtlas;
 
 			int pagesCount = 1;
-			var populatingMaterials = new List<Material>(pagesCount);
+			List<Material> populatingMaterials = new List<Material>(pagesCount);
 
 			{
 				string pageName = "SpriteAtlas";
@@ -900,7 +900,7 @@ namespace Spine.Unity.Editor {
 
 #if NEW_PREFERENCES_SETTINGS_PROVIDER
 		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";
 			if (!isTexturePreset)
 				return SetDefaultTextureSettings(texturePath, atlasAsset);
@@ -1026,7 +1026,7 @@ namespace Spine.Unity.Editor {
 					skeletonDataAsset.atlasAssets = atlasAssets;
 					SpineEditorUtilities.ClearSkeletonDataAsset(skeletonDataAsset);
 				}
-				var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+				SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 				if (skeletonData != null)
 					BlendModeMaterialsUtility.UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData);
 				AssetDatabase.SaveAssets();
@@ -1047,10 +1047,10 @@ namespace Spine.Unity.Editor {
 			DirectoryInfo dirInfo = new DirectoryInfo(dir);
 			FileInfo[] files = dirInfo.GetFiles("*.asset");
 
-			foreach (var path in files) {
+			foreach (FileInfo path in files) {
 				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)
 					return true;
 			}
@@ -1084,7 +1084,7 @@ namespace Spine.Unity.Editor {
 					if (selectedAtlas != null) {
 						localAtlases.Clear();
 						localAtlases.Add(selectedAtlas);
-						var atlasMatch = AssetUtility.GetMatchingAtlas(requiredPaths, localAtlases);
+						AtlasAssetBase atlasMatch = AssetUtility.GetMatchingAtlas(requiredPaths, localAtlases);
 						if (atlasMatch != null) {
 							resolved = true;
 							AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasMatch);
@@ -1094,7 +1094,7 @@ namespace Spine.Unity.Editor {
 				}
 				case 0: { // Resolve AtlasAssets...
 					string pathForwardSlash = Path.GetDirectoryName(skeletonPath).Replace('\\', '/');
-					var atlasList = MultiAtlasDialog(requiredPaths, pathForwardSlash,
+					List<AtlasAssetBase> atlasList = MultiAtlasDialog(requiredPaths, pathForwardSlash,
 						localAtlases, filename);
 					if (atlasList != null)
 						AssetUtility.IngestSpineProject(AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonPath), atlasList.ToArray());
@@ -1124,8 +1124,8 @@ namespace Spine.Unity.Editor {
 			while (!resolved) {
 
 				// 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("has missing regions.");
@@ -1141,8 +1141,8 @@ namespace Spine.Unity.Editor {
 					dialogText.AppendLine();
 					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++) {
 							if (atlas.FindRegionIgnoringNumberSuffix(missingRegions[i]) != null) {
 								missingRegions.RemoveAt(i);
@@ -1175,7 +1175,7 @@ namespace Spine.Unity.Editor {
 					AtlasAssetBase selectedAtlasAsset = BrowseAtlasDialog(lastAtlasPath, localAtlases);
 					if (selectedAtlasAsset != null) {
 						if (!atlasAssets.Contains(selectedAtlasAsset)) {
-							var atlas = selectedAtlasAsset.GetAtlas();
+							Atlas atlas = selectedAtlasAsset.GetAtlas();
 							bool hasValidRegion = false;
 							foreach (string str in missingRegions) {
 								if (atlas.FindRegionIgnoringNumberSuffix(str) != null) {
@@ -1250,7 +1250,7 @@ namespace Spine.Unity.Editor {
 			const string TintBlackShaderQuery = "Tint Black";
 
 			if (skeletonRenderer == null) return;
-			var skeletonDataAsset = skeletonRenderer.skeletonDataAsset;
+			SkeletonDataAsset skeletonDataAsset = skeletonRenderer.skeletonDataAsset;
 			if (skeletonDataAsset == null) return;
 
 			bool pmaVertexColors = false;
@@ -1279,7 +1279,7 @@ namespace Spine.Unity.Editor {
 			skeletonRenderer.tintBlack = tintBlack;
 			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.
 			skin = skin ?? data.DefaultSkin ?? (noSkins ? null : data.Skins.Items[0]);
 			if (skin != null && skin != data.DefaultSkin) {
@@ -1290,8 +1290,8 @@ namespace Spine.Unity.Editor {
 		public static SkeletonAnimation InstantiateSkeletonAnimation (SkeletonDataAsset skeletonDataAsset, string skinName,
 			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);
 		}
 
@@ -1358,10 +1358,10 @@ namespace Spine.Unity.Editor {
 		}
 
 		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);
 			EditorUtility.FocusProjectWindow();
 			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) {
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			if (skeletonData == null)
 				return;
 			UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData, true);
 		}
 
 		public static void UpdateBlendModeMaterials (SkeletonDataAsset skeletonDataAsset) {
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			if (skeletonData == null)
 				return;
 			UpdateBlendModeMaterials(skeletonDataAsset, ref skeletonData, false);
@@ -76,7 +76,7 @@ namespace Spine.Unity.Editor {
 			TemplateMaterials templateMaterials = new TemplateMaterials();
 			bool anyMaterialsChanged = ClearUndesiredMaterialEntries(skeletonDataAsset);
 
-			var blendModesModifierAsset = FindBlendModeMaterialsModifierAsset(skeletonDataAsset);
+			BlendModeMaterialsAsset blendModesModifierAsset = FindBlendModeMaterialsModifierAsset(skeletonDataAsset);
 			if (blendModesModifierAsset) {
 				if (upgradeFromModifierAssets) {
 					TransferSettingsFromModifierAsset(blendModesModifierAsset,
@@ -118,7 +118,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		protected static BlendModeMaterialsAsset FindBlendModeMaterialsModifierAsset (SkeletonDataAsset skeletonDataAsset) {
-			foreach (var modifierAsset in skeletonDataAsset.skeletonDataModifiers) {
+			foreach (SkeletonDataModifierAsset modifierAsset in skeletonDataAsset.skeletonDataModifiers) {
 				if (modifierAsset is BlendModeMaterialsAsset)
 					return (BlendModeMaterialsAsset)modifierAsset;
 			}
@@ -159,18 +159,18 @@ namespace Spine.Unity.Editor {
 			TemplateMaterials templateMaterials, ref bool anyReplacementMaterialsChanged) {
 
 			bool anyCreationFailed = false;
-			var blendModeMaterials = skeletonDataAsset.blendModeMaterials;
+			BlendModeMaterials blendModeMaterials = skeletonDataAsset.blendModeMaterials;
 			bool applyAdditiveMaterial = blendModeMaterials.applyAdditiveMaterial;
 
-			var skinEntries = new List<Skin.SkinEntry>();
+			List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 
 			SpineEditorUtilities.ClearSkeletonDataAsset(skeletonDataAsset);
 			skeletonDataAsset.isUpgradingBlendModeMaterials = 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++) {
-				var slot = slotsItems[slotIndex];
+				SlotData slot = slotsItems[slotIndex];
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 
@@ -196,13 +196,13 @@ namespace Spine.Unity.Editor {
 				}
 
 				skinEntries.Clear();
-				foreach (var skin in skeletonData.Skins)
+				foreach (Skin skin in skeletonData.Skins)
 					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) {
-						var originalRegion = (AtlasRegion)renderableAttachment.Region;
+						AtlasRegion originalRegion = (AtlasRegion)renderableAttachment.Region;
 						if (originalRegion != null) {
 							anyCreationFailed |= CreateForRegion(
 								ref replacementMaterials, ref anyReplacementMaterialsChanged,
@@ -236,7 +236,7 @@ namespace Spine.Unity.Editor {
 				replacement => replacement.pageName == originalRegion.page.name);
 			if (!replacementExists) {
 				bool createdNewMaterial;
-				var replacement = CreateOrLoadReplacementMaterial(originalRegion, materialTemplate, materialSuffix, out createdNewMaterial);
+				BlendModeMaterials.ReplacementMaterial replacement = CreateOrLoadReplacementMaterial(originalRegion, materialTemplate, materialSuffix, out createdNewMaterial);
 				if (replacement != null) {
 					replacementMaterials.Add(replacement);
 					anyReplacementMaterialsChanged = true;
@@ -256,8 +256,8 @@ namespace Spine.Unity.Editor {
 		}
 
 		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");
 		}
 
@@ -265,16 +265,16 @@ namespace Spine.Unity.Editor {
 			AtlasRegion originalRegion, Material materialTemplate, string materialSuffix, out bool createdNewMaterial) {
 
 			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;
 			if (File.Exists(blendMaterialPath)) {
 				newReplacement.material = AssetDatabase.LoadAssetAtPath<Material>(blendMaterialPath);
 			} else {
-				var blendModeMaterial = new Material(materialTemplate) {
+				Material blendModeMaterial = new Material(materialTemplate) {
 					name = originalMaterial.name + " " + materialTemplate.name,
 					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.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);
 				}
 
@@ -79,24 +79,24 @@ namespace Spine.Unity.Editor {
 				// by the instance of the ScriptableObject being destroyed but still assigned.
 				// Here we save the skeletonGraphic.skeletonDataAsset asset path in order
 				// 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) {
-						var assetPath = AssetDatabase.GetAssetPath(skeletonDataAsset);
-						var sgID = skeletonGraphic.GetInstanceID();
+						string assetPath = AssetDatabase.GetAssetPath(skeletonDataAsset);
+						int sgID = skeletonGraphic.GetInstanceID();
 						savedSkeletonDataAssetAtSKeletonGraphicID[sgID] = assetPath;
 						skeletonDataAssetsToReload.Add(skeletonDataAsset);
 					}
 				}
 
-				foreach (var skeletonDataAsset in skeletonDataAssetsToReload) {
+				foreach (SkeletonDataAsset skeletonDataAsset in skeletonDataAssetsToReload) {
 					ReloadSkeletonDataAsset(skeletonDataAsset, false);
 				}
 
-				foreach (var skeletonRenderer in activeSkeletonRenderers)
+				foreach (SkeletonRenderer skeletonRenderer in activeSkeletonRenderers)
 					skeletonRenderer.Initialize(true);
-				foreach (var skeletonGraphic in activeSkeletonGraphics)
+				foreach (SkeletonGraphic skeletonGraphic in activeSkeletonGraphics)
 					skeletonGraphic.Initialize(true);
 			}
 
@@ -106,13 +106,13 @@ namespace Spine.Unity.Editor {
 				if (EditorApplication.isCompiling) 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);
 				}
 
-				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)
 						graphic.Initialize(true);
 				}
@@ -133,7 +133,7 @@ namespace Spine.Unity.Editor {
 				foreach (string guid in guids) {
 					string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid);
 					if (!string.IsNullOrEmpty(path)) {
-						var referenceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(path);
+						AnimationReferenceAsset referenceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath<AnimationReferenceAsset>(path);
 						if (referenceAsset.SkeletonDataAsset == skeletonDataAsset)
 							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) {
-				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)
 					return;
 
 				// Allow drag and drop of one SkeletonDataAsset.
 				if (references.Length == 1) {
-					var skeletonDataAsset = references[0] as SkeletonDataAsset;
+					SkeletonDataAsset skeletonDataAsset = references[0] as SkeletonDataAsset;
 					if (skeletonDataAsset != null) {
-						var mousePos = current.mousePosition;
+						Vector2 mousePos = current.mousePosition;
 
 						bool invalidSkeletonData = skeletonDataAsset.GetSkeletonData(true) == null;
 						if (invalidSkeletonData) {
@@ -94,7 +94,7 @@ namespace Spine.Unity.Editor {
 
 			public static void ShowInstantiateContextMenu (SkeletonDataAsset skeletonDataAsset, Vector3 spawnPoint,
 				Transform parent, int siblingIndex = 0) {
-				var menu = new GenericMenu();
+				GenericMenu menu = new GenericMenu();
 
 				// SkeletonAnimation
 				menu.AddItem(new GUIContent("SkeletonAnimation"), false, HandleSkeletonComponentDrop, new SpawnMenuData {
@@ -107,9 +107,9 @@ namespace Spine.Unity.Editor {
 				});
 
 				// SkeletonGraphic
-				var skeletonGraphicInspectorType = System.Type.GetType("Spine.Unity.Editor.SkeletonGraphicInspector");
+				System.Type skeletonGraphicInspectorType = System.Type.GetType("Spine.Unity.Editor.SkeletonGraphicInspector");
 				if (skeletonGraphicInspectorType != null) {
-					var graphicInstantiateDelegate = skeletonGraphicInspectorType.GetMethod("SpawnSkeletonGraphicFromDrop", BindingFlags.Static | BindingFlags.Public);
+					MethodInfo graphicInstantiateDelegate = skeletonGraphicInspectorType.GetMethod("SpawnSkeletonGraphicFromDrop", BindingFlags.Static | BindingFlags.Public);
 					if (graphicInstantiateDelegate != null)
 						menu.AddItem(new GUIContent("SkeletonGraphic (UI)"), false, HandleSkeletonComponentDrop, new SpawnMenuData {
 							skeletonDataAsset = skeletonDataAsset,
@@ -138,7 +138,7 @@ namespace Spine.Unity.Editor {
 			}
 
 			public static void HandleSkeletonComponentDrop (object spawnMenuData) {
-				var data = (SpawnMenuData)spawnMenuData;
+				SpawnMenuData data = (SpawnMenuData)spawnMenuData;
 
 				if (data.skeletonDataAsset.GetSkeletonData(true) == null) {
 					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;
 				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)
 					newTransform.SetParent(usedParent.transform, false);
 				if (data.siblingIndex != 0)
@@ -193,8 +193,8 @@ namespace Spine.Unity.Editor {
 			/// Converts a mouse point to a world point on a plane.
 			/// </summary>
 			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;
 				bool hit = plane.Raycast(ray, out 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 {
 			[SettingsProvider]
 			public static SettingsProvider CreateSpineSettingsProvider () {
-				var provider = new SettingsProvider("Spine", SettingsScope.User) {
+				SettingsProvider provider = new SettingsProvider("Spine", SettingsScope.User) {
 					label = "Spine",
 					guiHandler = (searchContext) => {
-						var settings = SpinePreferences.GetOrCreateSettings();
-						var serializedSettings = new SerializedObject(settings);
+						SpinePreferences settings = SpinePreferences.GetOrCreateSettings();
+						SerializedObject serializedSettings = new SerializedObject(settings);
 						SpinePreferences.HandlePreferencesGUI(serializedSettings);
 						if (serializedSettings.ApplyModifiedProperties())
 							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);
 
 					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;
 					if (EditorGUI.EndChangeCheck())
 						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.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)) {
-						var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMAPresetTemplate");
+						string[] pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMAPresetTemplate");
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
 							textureSettingsReference = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
 							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."));
 					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) {
 							blendModeMaterialAdditive = AssetDatabase.GUIDToAssetPath(blendModeMaterialAdditiveGUIDS[0]);
 						}
 					}
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialMultiply, BLEND_MODE_MATERIAL_MULTIPLY_KEY, new GUIContent("Multiply Material", "Multiply blend mode Material template."));
 					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) {
 							blendModeMaterialMultiply = AssetDatabase.GUIDToAssetPath(blendModeMaterialMultiplyGUIDS[0]);
 						}
 					}
 					SpineEditorUtilities.MaterialPrefsField(ref blendModeMaterialScreen, BLEND_MODE_MATERIAL_SCREEN_KEY, new GUIContent("Screen Material", "Screen blend mode Material template."));
 					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) {
 							blendModeMaterialScreen = AssetDatabase.GUIDToAssetPath(blendModeMaterialScreenGUIDS[0]);
 						}
@@ -403,7 +403,7 @@ namespace Spine.Unity.Editor {
 		static void Texture2DPrefsField (ref string currentValue, string editorPrefsKey, GUIContent label) {
 			EditorGUI.BeginChangeCheck();
 			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) : "";
 			if (EditorGUI.EndChangeCheck()) {
 				EditorPrefs.SetString(editorPrefsKey, currentValue);
@@ -413,7 +413,7 @@ namespace Spine.Unity.Editor {
 		static void MaterialPrefsField (ref string currentValue, string editorPrefsKey, GUIContent label) {
 			EditorGUI.BeginChangeCheck();
 			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) : "";
 			if (EditorGUI.EndChangeCheck()) {
 				EditorPrefs.SetString(editorPrefsKey, currentValue);
@@ -429,18 +429,18 @@ namespace Spine.Unity.Editor {
 		}
 
 		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;
 		}
 
 		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) : "";
 		}
 
 #if NEW_PREFERENCES_SETTINGS_PROVIDER
 		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";
 			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 {
 				AssetDatabase.StartAssetEditing();
 				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);
 					GameObject prefabGameObject = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
 					if (SpineEditorUtilities.CleanupSpinePrefabMesh(prefabGameObject)) {
@@ -136,8 +136,8 @@ namespace Spine.Unity.Editor {
 			try {
 				AssetDatabase.StartAssetEditing();
 				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);
 					SpineSpriteAtlasAsset atlasAsset = AssetDatabase.LoadAssetAtPath<SpineSpriteAtlasAsset>(assetPath);
 					if (atlasAsset && atlasAsset.materials.Length > 0) {
@@ -162,7 +162,7 @@ namespace Spine.Unity.Editor {
 		internal static void PostprocessSpriteAtlases () {
 			BuildUtilities.IsInSpriteAtlasBuildPostProcessing = true;
 			try {
-				foreach (var pair in spriteAtlasTexturesToRestore) {
+				foreach (KeyValuePair<string, string> pair in spriteAtlasTexturesToRestore) {
 					string assetPath = pair.Key;
 					SpineSpriteAtlasAsset atlasAsset = AssetDatabase.LoadAssetAtPath<SpineSpriteAtlasAsset>(assetPath);
 					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
 			// in the middle of execution.
-			var texturesWithoutMetaFileCopy = new List<string>(texturesWithoutMetaFile);
+			List<string> texturesWithoutMetaFileCopy = new List<string>(texturesWithoutMetaFile);
 			AssetUtility.HandleOnPostprocessAllAssets(imported, texturesWithoutMetaFileCopy);
 			texturesWithoutMetaFile.Clear();
 		}
@@ -111,17 +111,17 @@ namespace Spine.Unity.Editor {
 		public static bool SetupSpinePrefabMesh (GameObject g, UnityEditor.AssetImporters.AssetImportContext context) {
 			Dictionary<string, int> nameUsageCount = new Dictionary<string, int>();
 			bool wasModified = false;
-			var skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
+			SkeletonRenderer[] skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
 			foreach (SkeletonRenderer renderer in skeletonRenderers) {
 				wasModified = true;
-				var meshFilter = renderer.GetComponent<MeshFilter>();
+				MeshFilter meshFilter = renderer.GetComponent<MeshFilter>();
 				if (meshFilter == null)
 					meshFilter = renderer.gameObject.AddComponent<MeshFilter>();
 
 				renderer.EditorUpdateMeshFilterHideFlags();
 				renderer.Initialize(true, true);
 				renderer.LateUpdateMesh();
-				var mesh = meshFilter.sharedMesh;
+				Mesh mesh = meshFilter.sharedMesh;
 				if (mesh == null) continue;
 
 				string meshName = string.Format("Skeleton Prefab Mesh \"{0}\"", renderer.name);
@@ -141,9 +141,9 @@ namespace Spine.Unity.Editor {
 
 		public static bool CleanupSpinePrefabMesh (GameObject g) {
 			bool wasModified = false;
-			var skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
+			SkeletonRenderer[] skeletonRenderers = g.GetComponentsInChildren<SkeletonRenderer>(true);
 			foreach (SkeletonRenderer renderer in skeletonRenderers) {
-				var meshFilter = renderer.GetComponent<MeshFilter>();
+				MeshFilter meshFilter = renderer.GetComponent<MeshFilter>();
 				if (meshFilter != null) {
 					if (meshFilter.sharedMesh) {
 						wasModified = true;
@@ -294,7 +294,7 @@ namespace Spine.Unity.Editor {
 			if (component == null) return;
 			if (!SkeletonDataAssetIsValid(component.SkeletonDataAsset)) return;
 
-			var stateComponent = component as IAnimationStateComponent;
+			IAnimationStateComponent stateComponent = component as IAnimationStateComponent;
 			AnimationState oldAnimationState = null;
 			if (stateComponent != null) {
 				oldAnimationState = stateComponent.AnimationState;
@@ -474,20 +474,20 @@ namespace Spine.Unity.Editor {
 			internal static void HandleDragAndDrop (int instanceId, Rect selectionRect) {
 				// HACK: Uses EditorApplication.hierarchyWindowItemOnGUI.
 				// 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 isDropEvent = eventType == EventType.DragPerform;
 				UnityEditor.DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
 
 				if (isDraggingEvent || isDropEvent) {
-					var mouseOverWindow = EditorWindow.mouseOverWindow;
+					EditorWindow mouseOverWindow = EditorWindow.mouseOverWindow;
 					if (mouseOverWindow != null) {
 
 						// One, existing, valid SkeletonDataAsset
-						var references = UnityEditor.DragAndDrop.objectReferences;
+						Object[] references = UnityEditor.DragAndDrop.objectReferences;
 						if (references.Length == 1) {
-							var skeletonDataAsset = references[0] as SkeletonDataAsset;
+							SkeletonDataAsset skeletonDataAsset = references[0] as SkeletonDataAsset;
 							if (skeletonDataAsset != null && skeletonDataAsset.GetSkeletonData(true) != null) {
 
 								// Allow drag-and-dropping anywhere in the Hierarchy Window.
@@ -496,12 +496,12 @@ namespace Spine.Unity.Editor {
 								const string GenericDataTargetID = "target";
 								if (HierarchyWindow.Equals(mouseOverWindow.GetType().ToString(), System.StringComparison.Ordinal)) {
 									if (isDraggingEvent) {
-										var mouseOverTarget = UnityEditor.EditorUtility.InstanceIDToObject(instanceId);
+										UnityEngine.Object mouseOverTarget = UnityEditor.EditorUtility.InstanceIDToObject(instanceId);
 										if (mouseOverTarget)
 											DragAndDrop.SetGenericData(GenericDataTargetID, mouseOverTarget);
 										// Note: do not call current.Use(), otherwise we get the wrong drop-target parent.
 									} 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;
 										// when dragging into empty space in hierarchy below last node, last node would be parent.
 										if (IsLastNodeInHierarchy(parent))
@@ -528,7 +528,7 @@ namespace Spine.Unity.Editor {
 					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);
 				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;
 			foreach (Bone b in skeleton.Bones) {
 				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);
 				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) {
 			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;
 
 			if (length > 0) {
@@ -202,16 +202,16 @@ namespace Spine.Unity.Editor {
 				scale.y *= (SpineEditorUtilities.Preferences.handleScale + 1) * 0.5f;
 				scale.y = Mathf.Clamp(scale.x, -my * skeletonRenderScale, my * skeletonRenderScale);
 				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);
 			} else {
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, color, transform.forward, skeletonRenderScale);
 			}
 		}
 
 		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;
 			if (length > 0) {
 				Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotationX);
@@ -222,13 +222,13 @@ namespace Spine.Unity.Editor {
 				SpineHandles.GetBoneMaterial().SetPass(0);
 				Graphics.DrawMeshNow(SpineHandles.BoneMesh, transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale));
 			} else {
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, SpineHandles.BoneColor, transform.forward, boneScale * skeletonRenderScale);
 			}
 		}
 
 		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;
 			if (length > 0) {
 				Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotationX);
@@ -239,14 +239,14 @@ namespace Spine.Unity.Editor {
 				SpineHandles.GetBoneMaterial(color).SetPass(0);
 				Graphics.DrawMeshNow(SpineHandles.BoneMesh, transform.localToWorldMatrix * Matrix4x4.TRS(pos, rot, scale));
 			} else {
-				var wp = transform.TransformPoint(pos);
+				Vector3 wp = transform.TransformPoint(pos);
 				DrawBoneCircle(wp, color, transform.forward, boneScale * skeletonRenderScale);
 			}
 		}
 
 		public static void DrawPaths (Transform transform, Skeleton skeleton) {
 			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);
 			}
 		}
@@ -261,7 +261,7 @@ namespace Spine.Unity.Editor {
 			float[] pv = pathVertexBuffer;
 			p.ComputeWorldVertices(s, pv);
 
-			var ocolor = Handles.color;
+			Color ocolor = Handles.color;
 			Handles.color = SpineHandles.PathColor;
 
 			Matrix4x4 m = t.localToWorldMatrix;
@@ -300,8 +300,8 @@ namespace Spine.Unity.Editor {
 		}
 
 		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);
 			}
 		}
@@ -309,7 +309,7 @@ namespace Spine.Unity.Editor {
 		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.
 
-			var worldVerts = new float[box.WorldVerticesLength];
+			float[] worldVerts = new float[box.WorldVerticesLength];
 			box.ComputeWorldVertices(slot, worldVerts);
 
 			Handles.color = Color.green;
@@ -355,15 +355,15 @@ namespace Spine.Unity.Editor {
 
 			// Transform Constraints
 			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);
 
 				if (tc.MixX > 0 || tc.MixY > 0) {
 					if ((tc.MixX > 0 && tc.MixX != 1f) ||
 						(tc.MixY > 0 && tc.MixY != 1f)) {
 						Handles.color = handleColor;
-						foreach (var b in tc.Bones) {
+						foreach (Bone b in tc.Bones) {
 							pos = b.GetWorldPosition(transform, skeletonRenderScale);
 							Handles.DrawDottedLine(targetPos, pos, Thickness);
 						}
@@ -376,10 +376,10 @@ namespace Spine.Unity.Editor {
 
 			// IK Constraints
 			handleColor = SpineHandles.IkColor;
-			foreach (var ikc in skeleton.IkConstraints) {
+			foreach (IkConstraint ikc in skeleton.IkConstraints) {
 				Bone targetBone = ikc.Target;
 				targetPos = targetBone.GetWorldPosition(transform, skeletonRenderScale);
-				var bones = ikc.Bones;
+				ExposedList<Bone> bones = ikc.Bones;
 				active = ikc.Mix > 0;
 				if (active) {
 					pos = bones.Items[0].GetWorldPosition(transform, skeletonRenderScale);
@@ -388,7 +388,7 @@ namespace Spine.Unity.Editor {
 						Handles.color = handleColor;
 						Handles.DrawLine(targetPos, pos);
 						SpineHandles.DrawBoneCircle(targetPos, handleColor, normal);
-						var m = bones.Items[0].GetMatrix4x4();
+						Matrix4x4 m = bones.Items[0].GetMatrix4x4();
 						m.m03 = targetBone.WorldX * skeletonRenderScale;
 						m.m13 = targetBone.WorldY * skeletonRenderScale;
 						SpineHandles.DrawArrowhead(transform.localToWorldMatrix * m);
@@ -403,7 +403,7 @@ namespace Spine.Unity.Editor {
 						SpineHandles.DrawBoneCircle(pos, handleColor, normal, 0.5f);
 						SpineHandles.DrawBoneCircle(child, handleColor, normal, 0.5f);
 						SpineHandles.DrawBoneCircle(targetPos, handleColor, normal);
-						var m = childBone.GetMatrix4x4();
+						Matrix4x4 m = childBone.GetMatrix4x4();
 						m.m03 = targetBone.WorldX * skeletonRenderScale;
 						m.m13 = targetBone.WorldY * skeletonRenderScale;
 						SpineHandles.DrawArrowhead(transform.localToWorldMatrix * m);
@@ -416,10 +416,10 @@ namespace Spine.Unity.Editor {
 
 			// Path Constraints
 			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;
 				if (active)
-					foreach (var b in pc.Bones)
+					foreach (Bone b in pc.Bones)
 						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) {
 			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);
 			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) {
 			if (so.isEditingMultipleObjects) {
 				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++) {
-					var sr = so.targetObjects[i] as IHasSkeletonDataAsset;
+					IHasSkeletonDataAsset sr = so.targetObjects[i] as IHasSkeletonDataAsset;
 					if (sr != null && sr.SkeletonDataAsset != first.SkeletonDataAsset)
 						return false;
 				}
@@ -294,20 +294,20 @@ namespace Spine.Unity.Editor {
 
 		public static SerializedObject GetRenderersSerializedObject (SerializedObject serializedObject) {
 			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) {
-						var renderer = component.GetComponent<Renderer>();
+						Renderer renderer = component.GetComponent<Renderer>();
 						if (renderer != null)
 							renderers.Add(renderer);
 					}
 				}
 				return new SerializedObject(renderers.ToArray());
 			} else {
-				var component = serializedObject.targetObject as Component;
+				Component component = serializedObject.targetObject as Component;
 				if (component != null) {
-					var renderer = component.GetComponent<Renderer>();
+					Renderer renderer = component.GetComponent<Renderer>();
 					if (renderer != null)
 						return new SerializedObject(renderer);
 				}
@@ -350,7 +350,7 @@ namespace Spine.Unity.Editor {
 
 				// SetDirty
 				if (renderer.isEditingMultipleObjects)
-					foreach (var o in renderer.targetObjects)
+					foreach (UnityEngine.Object o in renderer.targetObjects)
 						EditorUtility.SetDirty(o);
 				else
 					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
 
-using UnityEngine;
-using UnityEditor;
 using System.Collections.Generic;
 using System.IO;
-using System.Text;
 using System.Linq;
 using System.Reflection;
+using System.Text;
+using UnityEditor;
+using UnityEngine;
 
 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_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 &&
 				maskInteraction == SpriteMaskInteraction.None) {
 				meshRenderer.materials = maskMaterials.materialsMaskDisabled;
-			}
-			else if (maskInteraction == SpriteMaskInteraction.VisibleInsideMask) {
+			} else if (maskInteraction == SpriteMaskInteraction.VisibleInsideMask) {
 				if (maskMaterials.materialsInsideMask.Length == 0 || maskMaterials.materialsInsideMask[0] == null)
 					EditorInitSpriteMaskMaterialsInsideMask(skeleton);
 				meshRenderer.materials = maskMaterials.materialsInsideMask;
-			}
-			else if (maskInteraction == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskInteraction == SpriteMaskInteraction.VisibleOutsideMask) {
 				if (maskMaterials.materialsOutsideMask.Length == 0 || maskMaterials.materialsOutsideMask[0] == null)
 					EditorInitSpriteMaskMaterialsOutsideMask(skeleton);
 				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) {
 				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 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) {
 				EditorConfirmDisabledMaskMaterialsInit(skeleton);
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 				EditorInitSpriteMaskMaterialsInsideMask(skeleton);
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
 				EditorInitSpriteMaskMaterialsOutsideMask(skeleton);
 			}
 		}
 
-		public static void EditorDeleteMaskMaterials(SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials, SpriteMaskInteraction maskType) {
+		public static void EditorDeleteMaskMaterials (SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials, SpriteMaskInteraction maskType) {
 			Material[] targetMaterials;
 			if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 				targetMaterials = maskMaterials.materialsInsideMask;
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
 				targetMaterials = maskMaterials.materialsOutsideMask;
-			}
-			else {
+			} else {
 				Debug.LogWarning("EditorDeleteMaskMaterials: Normal materials are kept as a reference and shall never be deleted.");
 				return;
 			}
 
 			for (int i = 0; i < targetMaterials.Length; ++i) {
-				var material = targetMaterials[i];
+				Material material = targetMaterials[i];
 				if (material != null) {
 					string materialPath = UnityEditor.AssetDatabase.GetAssetPath(material);
 					UnityEditor.AssetDatabase.DeleteAsset(materialPath);
@@ -134,31 +127,30 @@ namespace Spine.Unity.Editor {
 
 			if (maskType == SpriteMaskInteraction.VisibleInsideMask) {
 				maskMaterials.materialsInsideMask = new Material[0];
-			}
-			else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
+			} else if (maskType == SpriteMaskInteraction.VisibleOutsideMask) {
 				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,
 													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,
 													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) {
 			if (!EditorConfirmDisabledMaskMaterialsInit(skeleton))
 				return;
 
-			var maskMaterials = skeleton.maskMaterials;
-			var originalMaterials = maskMaterials.materialsMaskDisabled;
+			SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials = skeleton.maskMaterials;
+			Material[] originalMaterials = maskMaterials.materialsMaskDisabled;
 			materialsToFill = new Material[originalMaterials.Length];
 			for (int i = 0; i < originalMaterials.Length; i++) {
 				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) {
 				return true;
 			}
 
-			var meshRenderer = skeleton.GetComponent<MeshRenderer>();
+			MeshRenderer meshRenderer = skeleton.GetComponent<MeshRenderer>();
 			Material[] currentMaterials = meshRenderer.sharedMaterials;
 
 			if (currentMaterials.Length == 0 || currentMaterials[0] == null) {
@@ -200,8 +192,7 @@ namespace Spine.Unity.Editor {
 					string correctPath = null;
 					if (path.Contains(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, "");
 					}
 
@@ -212,14 +203,13 @@ namespace Spine.Unity.Editor {
 						maskMaterials.materialsMaskDisabled[i] = material;
 					}
 				}
-			}
-			else {
+			} else {
 				maskMaterials.materialsMaskDisabled = currentMaterials;
 			}
 			return true;
 		}
 
-		public static Material EditorCreateOrLoadMaskMaterialAsset(SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials,
+		public static Material EditorCreateOrLoadMaskMaterialAsset (SkeletonRenderer.SpriteMaskInteractionMaterials maskMaterials,
 																UnityEngine.Rendering.CompareFunction maskFunction, Material originalMaterial) {
 			string originalMaterialPath = UnityEditor.AssetDatabase.GetAssetPath(originalMaterial);
 			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.IO;
 using System.Linq;
+using System.Text;
 using UnityEditor;
 using UnityEngine;
 
@@ -80,7 +81,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		public static void GenerateMecanimAnimationClips (SkeletonDataAsset skeletonDataAsset) {
-			var data = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData data = skeletonDataAsset.GetSkeletonData(true);
 			if (data == null) {
 				Debug.LogError("SkeletonData loading failed!", skeletonDataAsset);
 				return;
@@ -110,16 +111,16 @@ namespace Spine.Unity.Editor {
 
 			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());
 				// There is a bug in Unity 5.3.3 (and likely before) that creates
 				// a duplicate AnimationClip when you duplicate a Mecanim Animator State.
 				// These duplicates seem to be identifiable by their HideFlags, so we'll exclude them.
 				if (o is AnimationClip) {
-					var clip = o as AnimationClip;
+					AnimationClip clip = o as AnimationClip;
 					if (!clip.HasFlag(HideFlags.HideInHierarchy)) {
 						if (unityAnimationClipTable.ContainsKey(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.
 				spineAnimationTable.Add(animationName, animations);
 
@@ -144,12 +145,12 @@ namespace Spine.Unity.Editor {
 
 				AnimationClip clip = unityAnimationClipTable[animationName];
 				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;
 				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) {
 					if (t is EventTimeline)
 						ParseEventTimeline(ref animationEvents, (EventTimeline)t, SendMessageOptions.DontRequireReceiver);
@@ -161,7 +162,7 @@ namespace Spine.Unity.Editor {
 				unityAnimationClipTable.Remove(animationName);
 			}
 
-			foreach (var clip in unityAnimationClipTable.Values) {
+			foreach (AnimationClip clip in unityAnimationClipTable.Values) {
 				AnimationClip.DestroyImmediate(clip, true);
 			}
 
@@ -192,14 +193,14 @@ namespace Spine.Unity.Editor {
 				System.IO.Directory.CreateDirectory(outputPath);
 			}
 
-			var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(true);
 			bool hasAnimations = bakeAnimations && skeletonData.Animations.Count > 0;
 			UnityEditor.Animations.AnimatorController controller = null;
 			if (hasAnimations) {
 				string controllerPath = outputPath + "/" + skeletonDataAsset.skeletonJSON.name + " Controller.controller";
 				bool newAnimContainer = false;
 
-				var runtimeController = AssetDatabase.LoadAssetAtPath(controllerPath, typeof(RuntimeAnimatorController));
+				UnityEngine.Object runtimeController = AssetDatabase.LoadAssetAtPath(controllerPath, typeof(RuntimeAnimatorController));
 
 				if (runtimeController != null) {
 					controller = (UnityEditor.Animations.AnimatorController)runtimeController;
@@ -208,13 +209,13 @@ namespace Spine.Unity.Editor {
 					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);
 
 				foreach (Object o in animObjs) {
 					if (o is AnimationClip) {
-						var clip = (AnimationClip)o;
+						AnimationClip clip = (AnimationClip)o;
 						existingClipTable.Add(clip.name, clip);
 						unusedClipNames.Add(clip.name);
 					}
@@ -227,10 +228,10 @@ namespace Spine.Unity.Editor {
 				for (int s = 0; s < skeletonData.Slots.Count; s++) {
 					List<string> attachmentNames = new List<string>();
 					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);
-						foreach (var entry in skinEntries) {
+						foreach (Skin.SkinEntry entry in skinEntries) {
 							if (!attachmentNames.Contains(entry.Name))
 								attachmentNames.Add(entry.Name);
 						}
@@ -238,7 +239,7 @@ namespace Spine.Unity.Editor {
 					slotLookup.Add(s, attachmentNames);
 				}
 
-				foreach (var anim in skeletonData.Animations) {
+				foreach (Animation anim in skeletonData.Animations) {
 
 					AnimationClip clip = null;
 					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;
 
 				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>();
 				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) {
 						meshTable.Add(obj.name, (Mesh)obj);
 						unusedMeshNames.Add(obj.name);
@@ -309,7 +310,7 @@ namespace Spine.Unity.Editor {
 
 				//create bones
 				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;
 					boneTransform.parent = prefabRoot.transform;
 					boneTable.Add(boneTransform.name, boneTransform);
@@ -318,7 +319,7 @@ namespace Spine.Unity.Editor {
 
 				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 parentTransform = null;
 					if (i > 0)
@@ -328,7 +329,7 @@ namespace Spine.Unity.Editor {
 
 					boneTransform.parent = parentTransform;
 					boneTransform.localPosition = new Vector3(boneData.X, boneData.Y, 0);
-					var tm = boneData.TransformMode;
+					TransformMode tm = boneData.TransformMode;
 					if (tm.InheritsRotation())
 						boneTransform.localRotation = Quaternion.Euler(0, 0, boneData.Rotation);
 					else
@@ -340,18 +341,18 @@ namespace Spine.Unity.Editor {
 
 				//create slots and attachments
 				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;
 					slotTransform.parent = prefabRoot.transform;
 					slotTable.Add(slotData.Name, slotTransform);
 
-					var skinEntries = new List<Skin.SkinEntry>();
+					List<Skin.SkinEntry> skinEntries = new List<Skin.SkinEntry>();
 					skin.GetAttachments(slotIndex, skinEntries);
 					if (skin != skeletonData.DefaultSkin)
 						skeletonData.DefaultSkin.GetAttachments(slotIndex, skinEntries);
 
 					for (int a = 0; a < skinEntries.Count; a++) {
-						var attachment = skinEntries[a].Attachment;
+						Attachment attachment = skinEntries[a].Attachment;
 						string attachmentName = skinEntries[a].Name;
 						string attachmentMeshName = "[" + slotData.Name + "] " + attachmentName;
 						Vector3 offset = Vector3.zero;
@@ -363,7 +364,7 @@ namespace Spine.Unity.Editor {
 						if (meshTable.ContainsKey(attachmentMeshName))
 							mesh = meshTable[attachmentMeshName];
 						if (attachment is RegionAttachment) {
-							var regionAttachment = (RegionAttachment)attachment;
+							RegionAttachment regionAttachment = (RegionAttachment)attachment;
 							offset.x = regionAttachment.X;
 							offset.y = regionAttachment.Y;
 							rotation = regionAttachment.Rotation;
@@ -373,7 +374,7 @@ namespace Spine.Unity.Editor {
 							if (newPrefab || meshTable.ContainsKey(attachmentMeshName) == false)
 								AssetDatabase.AddObjectToAsset(mesh, prefab);
 						} else if (attachment is MeshAttachment) {
-							var meshAttachment = (MeshAttachment)attachment;
+							MeshAttachment meshAttachment = (MeshAttachment)attachment;
 							isWeightedMesh = (meshAttachment.Bones != null);
 							offset.x = 0;
 							offset.y = 0;
@@ -400,7 +401,7 @@ namespace Spine.Unity.Editor {
 						if (isWeightedMesh) {
 							attachmentTransform.position = Vector3.zero;
 							attachmentTransform.rotation = Quaternion.identity;
-							var skinnedMeshRenderer = attachmentTransform.gameObject.AddComponent<SkinnedMeshRenderer>();
+							SkinnedMeshRenderer skinnedMeshRenderer = attachmentTransform.gameObject.AddComponent<SkinnedMeshRenderer>();
 							skinnedMeshRenderer.rootBone = boneList[0];
 							skinnedMeshRenderer.bones = boneList.ToArray();
 							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];
 					slotTransform.parent = boneTable[slotData.BoneData.Name];
 					slotTransform.localPosition = Vector3.zero;
@@ -427,7 +428,7 @@ namespace Spine.Unity.Editor {
 				}
 
 				if (hasAnimations) {
-					var animator = prefabRoot.AddComponent<Animator>();
+					Animator animator = prefabRoot.AddComponent<Animator>();
 					animator.applyRootMotion = false;
 					animator.runtimeAnimatorController = (RuntimeAnimatorController)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) {
-			var slot = GetDummySlot();
-			var bone = slot.Bone;
+			Slot slot = GetDummySlot();
+			Bone bone = slot.Bone;
 
 			if (centered) {
 				bone.X = -attachment.X;
@@ -544,7 +545,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		internal static Mesh ExtractMeshAttachment (string name, MeshAttachment attachment, Mesh mesh = null) {
-			var slot = GetDummySlot();
+			Slot slot = GetDummySlot();
 
 			slot.Bone.X = 0;
 			slot.Bone.Y = 0;
@@ -640,8 +641,8 @@ namespace Spine.Unity.Editor {
 			mesh.RecalculateBounds();
 
 			// 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;
 			float[] weights = attachment.Vertices;
@@ -668,9 +669,9 @@ namespace Spine.Unity.Editor {
 
 			for (int i = 0; i < weightTable.Count; i++) {
 				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++) {
 					if (b > 3) {
@@ -746,9 +747,9 @@ namespace Spine.Unity.Editor {
 
 		#region Animation Baking
 		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) {
 				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.stopTime = Mathf.Max(clip.length, 0.001f);
 
@@ -901,8 +902,8 @@ namespace Spine.Unity.Editor {
 		}
 
 		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 yCurve = new AnimationCurve();
@@ -1044,8 +1045,8 @@ namespace Spine.Unity.Editor {
 			CurveTimeline1 timeline = isXTimeline ? timelineX : timelineY as CurveTimeline1;
 			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;
 
 			AnimationCurve curve = new AnimationCurve();
@@ -1137,8 +1138,8 @@ namespace Spine.Unity.Editor {
 		}
 
 		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 yCurve = new AnimationCurve();
@@ -1275,8 +1276,8 @@ namespace Spine.Unity.Editor {
 			CurveTimeline1 timeline = isXTimeline ? timelineX : timelineY as CurveTimeline1;
 			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;
 
 			AnimationCurve curve = new AnimationCurve();
@@ -1366,16 +1367,16 @@ namespace Spine.Unity.Editor {
 		}
 
 		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 currentTime = timeline.Frames[0];
 
-			var keys = new List<Keyframe>();
+			List<Keyframe> keys = new List<Keyframe>();
 
 			float rotation = timeline.Frames[1] + boneData.Rotation;
 
@@ -1500,7 +1501,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		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);
 			AnimationUtility.SetAnimationEvents(clip, animationEvents.ToArray());
 		}
@@ -1509,16 +1510,16 @@ namespace Spine.Unity.Editor {
 			EventTimeline timeline, SendMessageOptions eventOptions) {
 
 			float[] frames = timeline.Frames;
-			var events = timeline.Events;
+			Event[] events = timeline.Events;
 
 			for (int i = 0, n = frames.Length; i < n; i++) {
-				var spineEvent = events[i];
+				Event spineEvent = events[i];
 				string eventName = spineEvent.Data.Name;
 				if (SpineEditorUtilities.Preferences.mecanimEventIncludeFolderName)
 					eventName = eventName.Replace("/", ""); // calls method FolderNameEventName()
 				else
 					eventName = eventName.Substring(eventName.LastIndexOf('/') + 1); // calls method EventName()
-				var unityAnimationEvent = new AnimationEvent {
+				AnimationEvent unityAnimationEvent = new AnimationEvent {
 					time = frames[i],
 					functionName = eventName,
 					messageOptions = eventOptions,
@@ -1541,7 +1542,7 @@ namespace Spine.Unity.Editor {
 			foreach (AnimationEvent previousEvent in previousEvents) {
 				if (previousEvent.stringParameter == SpineEventStringId)
 					continue;
-				var identicalEvent = allEvents.Find(newEvent => {
+				AnimationEvent identicalEvent = allEvents.Find(newEvent => {
 					return newEvent.functionName == previousEvent.functionName &&
 						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) {
-			var attachmentNames = slotLookup[timeline.SlotIndex];
+			List<string> attachmentNames = slotLookup[timeline.SlotIndex];
 
 			string bonePath = GetPath(skeleton.Slots.Items[timeline.SlotIndex].Bone.Data);
 			string slotPath = bonePath + "/" + skeleton.Slots.Items[timeline.SlotIndex].Data.Name;
@@ -1568,7 +1569,7 @@ namespace Spine.Unity.Editor {
 
 			if (frames[0] != 0) {
 				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) {
 						pair.Value.AddKey(new Keyframe(0, 0, float.PositiveInfinity, float.PositiveInfinity));
 					} else {
@@ -1590,7 +1591,7 @@ namespace Spine.Unity.Editor {
 				int frameIndex = Search(frames, time);
 
 				string name = timeline.AttachmentNames[frameIndex];
-				foreach (var pair in curveTable) {
+				foreach (KeyValuePair<string, AnimationCurve> pair in curveTable) {
 					if (name == "") {
 						pair.Value.AddKey(new Keyframe(time, 0, float.PositiveInfinity, float.PositiveInfinity));
 					} else {
@@ -1606,7 +1607,7 @@ namespace Spine.Unity.Editor {
 				f += 1;
 			}
 
-			foreach (var pair in curveTable) {
+			foreach (KeyValuePair<string, AnimationCurve> pair in curveTable) {
 				string path = slotPath + "/" + pair.Key;
 				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)]
 		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.maxSize = new Vector2(600f, 1000f);
 			window.titleContent = new GUIContent("Skeleton Baking", Icons.spine);
@@ -94,7 +94,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.HelpBox(BakingWarningMessage, MessageType.Info, true);
 
 			EditorGUI.BeginChangeCheck();
-			var skeletonDataAssetProperty = so.FindProperty("skeletonDataAsset");
+			SerializedProperty skeletonDataAssetProperty = so.FindProperty("skeletonDataAsset");
 			EditorGUILayout.PropertyField(skeletonDataAssetProperty, SpineInspectorUtility.TempContent("SkeletonDataAsset", Icons.spine));
 			if (EditorGUI.EndChangeCheck()) {
 				so.ApplyModifiedProperties();
@@ -103,7 +103,7 @@ namespace Spine.Unity.Editor {
 			EditorGUILayout.Space();
 
 			if (skeletonDataAsset == null) return;
-			var skeletonData = skeletonDataAsset.GetSkeletonData(false);
+			SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(false);
 			if (skeletonData == null) return;
 			bool hasExtraSkins = skeletonData.Skins.Count > 1;
 
@@ -121,7 +121,7 @@ namespace Spine.Unity.Editor {
 					}
 
 					int totalAttachments = 0;
-					foreach (var s in skeletonData.Skins)
+					foreach (Skin s in skeletonData.Skins)
 						totalAttachments += s.Attachments.Count;
 					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)
 				bakeSkin = skeletonData.FindSkin(skinToBake) ?? skeletonData.DefaultSkin;
 
-			var prefabIcon = EditorGUIUtility.FindTexture("PrefabModel Icon");
+			Texture2D prefabIcon = EditorGUIUtility.FindTexture("PrefabModel Icon");
 
 			if (hasExtraSkins) {
 				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)]
 		public static void Init () {
-			var window = EditorWindow.GetWindow<SkeletonDebugWindow>(IsUtilityWindow);
+			SkeletonDebugWindow window = EditorWindow.GetWindow<SkeletonDebugWindow>(IsUtilityWindow);
 			window.minSize = new Vector2(330f, 360f);
 			window.maxSize = new Vector2(600f, 4000f);
 			window.titleContent = new GUIContent("Skeleton Debug", Icons.spine);
@@ -92,7 +92,7 @@ namespace Spine.Unity.Editor {
 			if (skeleton == null || skeletonRenderer == null || !skeletonRenderer.valid || isPrefab)
 				return;
 
-			var transform = skeletonRenderer.transform;
+			Transform transform = skeletonRenderer.transform;
 			if (showPaths) SpineHandles.DrawPaths(transform, skeleton);
 			if (showConstraints) SpineHandles.DrawConstraints(transform, skeleton);
 			if (showBoneNames) SpineHandles.DrawBoneNames(transform, skeleton);
@@ -115,11 +115,11 @@ namespace Spine.Unity.Editor {
 
 			bool noSkeletonRenderer = false;
 
-			var selectedObject = Selection.activeGameObject;
+			GameObject selectedObject = Selection.activeGameObject;
 			if (selectedObject == null) {
 				noSkeletonRenderer = true;
 			} else {
-				var selectedSkeletonRenderer = selectedObject.GetComponent<SkeletonRenderer>();
+				SkeletonRenderer selectedSkeletonRenderer = selectedObject.GetComponent<SkeletonRenderer>();
 				if (selectedSkeletonRenderer == null) {
 					noSkeletonRenderer = true;
 				} 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) {
 			if (disabledGroup) EditorGUI.BeginDisabledGroup(true);
-			var pos = EditorGUILayout.GetControlRect(true);
+			Rect pos = EditorGUILayout.GetControlRect(true);
 			pos = EditorGUI.PrefixLabel(pos, SpineInspectorUtility.TempContent(label));
 			GUI.Button(pos, SpineInspectorUtility.TempContent(stringValue, icon), EditorStyles.popup);
 			if (disabledGroup) EditorGUI.EndDisabledGroup();
@@ -275,7 +275,7 @@ namespace Spine.Unity.Editor {
 
 								if (bone != null) {
 									using (new EditorGUI.DisabledGroupScope(true)) {
-										var wm = EditorGUIUtility.wideMode;
+										bool wm = EditorGUIUtility.wideMode;
 										EditorGUIUtility.wideMode = true;
 										EditorGUILayout.Slider("Local Rotation", ViewRound(bone.Rotation), -180f, 180f);
 										EditorGUILayout.Vector2Field("Local Position", RoundVector2(bone.X, bone.Y));
@@ -284,12 +284,12 @@ namespace Spine.Unity.Editor {
 
 										EditorGUILayout.Space();
 
-										var boneParent = bone.Parent;
+										Bone boneParent = bone.Parent;
 										if (boneParent != null) FalseDropDown("Parent", boneParent.Data.Name, Icons.bone);
 
 										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.fieldWidth *= 0.5f;
 										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;
 								EditorGUI.indentLevel = baseIndent + 2;
-								var icon = Icons.GetAttachmentIcon(attachment);
+								Texture2D icon = Icons.GetAttachmentIcon(attachment);
 								bool isAttached = (attachment == slot.Attachment);
 								bool swap = EditorGUILayout.ToggleLeft(SpineInspectorUtility.TempContent(attachment.Name, icon), attachment == slot.Attachment);
 								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);
 							using (new SpineInspectorUtility.IndentScope()) {
 								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));
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone, 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);
 							using (new SpineInspectorUtility.IndentScope()) {
 								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));
 										EditorGUI.BeginDisabledGroup(true);
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone);
@@ -442,11 +442,11 @@ namespace Spine.Unity.Editor {
 
 							using (new SpineInspectorUtility.IndentScope()) {
 								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));
 										EditorGUI.BeginDisabledGroup(true);
 										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);
 										EditorGUILayout.LabelField("PositionMode." + c.Data.PositionMode);
 										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);
-
-				//var separatorSlotNamesField =
-				//SpineInspectorUtility.ge
 				if (showDrawOrderTree.faded > 0) {
 					using (new SpineInspectorUtility.IndentScope()) {
 						using (new EditorGUILayout.FadeGroupScope(showDrawOrderTree.faded)) {
@@ -483,7 +480,7 @@ namespace Spine.Unity.Editor {
 							const string SeparatorString = "------------- v SEPARATOR v -------------";
 
 							if (Application.isPlaying) {
-								foreach (var slot in skeleton.DrawOrder) {
+								foreach (Slot slot in skeleton.DrawOrder) {
 									if (skeletonRenderer.separatorSlots.Contains(slot)) EditorGUILayout.LabelField(SeparatorString);
 
 									using (new EditorGUI.DisabledScope(!slot.Bone.Active)) {
@@ -491,8 +488,8 @@ namespace Spine.Unity.Editor {
 									}
 								}
 							} 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++) {
 										if (string.Equals(slotNames[i], slot.Data.Name, System.StringComparison.Ordinal)) {
 											EditorGUILayout.LabelField(SeparatorString);
@@ -514,7 +511,7 @@ namespace Spine.Unity.Editor {
 					using (new SpineInspectorUtility.IndentScope()) {
 						using (new EditorGUILayout.FadeGroupScope(showEventDataTree.faded)) {
 							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));
 								}
 							} else {
@@ -529,7 +526,7 @@ namespace Spine.Unity.Editor {
 					using (new SpineInspectorUtility.IndentScope()) {
 						using (new EditorGUILayout.FadeGroupScope(showDataTree.faded)) {
 							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("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()));
@@ -568,7 +565,7 @@ namespace Spine.Unity.Editor {
 		}
 
 		static bool IsAnimating (params AnimBool[] animBools) {
-			foreach (var a in animBools)
+			foreach (AnimBool a in animBools)
 				if (a.isAnimating) return true;
 			return false;
 		}
@@ -581,7 +578,7 @@ namespace Spine.Unity.Editor {
 
 			attachmentTable.Clear();
 			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);
 				// Add skin 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);
 			foreach (string guid in guids) {
 				string path = AssetDatabase.GUIDToAssetPath(guid);
-				var preferences = AssetDatabase.LoadAssetAtPath<SpinePreferences>(path);
+				SpinePreferences preferences = AssetDatabase.LoadAssetAtPath<SpinePreferences>(path);
 				if (preferences != null)
 					return preferences;
 			}
@@ -234,7 +234,7 @@ namespace Spine.Unity.Editor {
 			string blendType, bool isTexturePresetPMA) {
 
 			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)
 				return;
 
@@ -276,12 +276,12 @@ namespace Spine.Unity.Editor {
 					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."));
-					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."));
 					if (string.IsNullOrEmpty(textureSettingsRef.stringValue)) {
-						var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
+						string[] pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
 						if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
-							var assetPath = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
+							string assetPath = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
 							if (!string.IsNullOrEmpty(assetPath))
 								textureSettingsRef.stringValue = assetPath;
 						}
@@ -323,7 +323,7 @@ namespace Spine.Unity.Editor {
 				EditorGUILayout.LabelField("Handles and Gizmos", EditorStyles.boldLabel);
 				{
 					EditorGUI.BeginChangeCheck();
-					var scaleProperty = settings.FindProperty("handleScale");
+					SerializedProperty scaleProperty = settings.FindProperty("handleScale");
 					EditorGUILayout.PropertyField(scaleProperty, new GUIContent("Editor Bone Scale"));
 					if (EditorGUI.EndChangeCheck()) {
 						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)]
 		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.maxSize = new Vector2(500f, 256f);
 			window.titleContent = new GUIContent("Spine SpriteAtlas Import", Icons.spine);
@@ -74,7 +74,7 @@ namespace Spine.Unity.Editor {
 
 			using (new SpineInspectorUtility.BoxScope()) {
 				EditorGUI.BeginChangeCheck();
-				var spriteAtlasAssetProperty = so.FindProperty("spriteAtlasAsset");
+				SerializedProperty spriteAtlasAssetProperty = so.FindProperty("spriteAtlasAsset");
 				EditorGUILayout.PropertyField(spriteAtlasAssetProperty, new GUIContent("SpriteAtlas", EditorGUIUtility.IconContent("SpriteAtlas Icon").image));
 				if (EditorGUI.EndChangeCheck()) {
 					so.ApplyModifiedProperties();
@@ -86,7 +86,7 @@ namespace Spine.Unity.Editor {
 					}
 				}
 
-				var spineSpriteAtlasAssetProperty = so.FindProperty("spineSpriteAtlasAsset");
+				SerializedProperty spineSpriteAtlasAssetProperty = so.FindProperty("spineSpriteAtlasAsset");
 				EditorGUI.BeginChangeCheck();
 				EditorGUILayout.PropertyField(spineSpriteAtlasAssetProperty, new GUIContent("SpineSpriteAtlasAsset", EditorGUIUtility.IconContent("ScriptableObject Icon").image));
 				if (spineSpriteAtlasAssetProperty.objectReferenceValue == null) {
@@ -120,7 +120,7 @@ namespace Spine.Unity.Editor {
 			using (new SpineInspectorUtility.BoxScope()) {
 
 				using (new EditorGUI.DisabledScope(!isAtlasComplete)) {
-					var skeletonDataAssetProperty = so.FindProperty("skeletonDataFile");
+					SerializedProperty skeletonDataAssetProperty = so.FindProperty("skeletonDataFile");
 					EditorGUI.BeginChangeCheck();
 					EditorGUILayout.PropertyField(skeletonDataAssetProperty, SpineInspectorUtility.TempContent("Skeleton json/skel file", Icons.spine));
 					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) {
 				EditorGUILayout.Space();
 				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");
 			copyMeshRendererFlags_ = serializedObject.FindProperty("copyMeshRendererFlags");
 
-			var partsRenderers = component.partsRenderers;
+			List<SkeletonPartsRenderer> partsRenderers = component.partsRenderers;
 			partsRenderers_ = serializedObject.FindProperty("partsRenderers");
 			partsRenderers_.isExpanded = partsRenderersExpanded ||  // last state
 				partsRenderers.Contains(null) ||    // null items found
@@ -87,7 +87,7 @@ namespace Spine.Unity.Examples {
 			bool isMeshFilterAlwaysNull = false;
 #if UNITY_EDITOR && NEW_PREFAB_SYSTEM
 			// 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) &&
 				(prefabType == UnityEditor.PrefabAssetType.Regular || prefabType == UnityEditor.PrefabAssetType.Variant)) {
 				isMeshFilterAlwaysNull = true;
@@ -99,7 +99,7 @@ namespace Spine.Unity.Examples {
 				component.OnEnable();
 			}
 
-			var componentRenderers = component.partsRenderers;
+			List<SkeletonPartsRenderer> componentRenderers = component.partsRenderers;
 			int totalParts;
 
 			using (new SpineInspectorUtility.LabelWidthScope()) {
@@ -122,7 +122,7 @@ namespace Spine.Unity.Examples {
 				{
 					EditorGUI.indentLevel++;
 					EditorGUI.BeginChangeCheck();
-					var foldoutSkeletonRendererRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
+					Rect foldoutSkeletonRendererRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
 					EditorGUI.PropertyField(foldoutSkeletonRendererRect, skeletonRenderer_);
 					if (EditorGUI.EndChangeCheck())
 						serializedObject.ApplyModifiedProperties();
@@ -170,7 +170,7 @@ namespace Spine.Unity.Examples {
 
 
 				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);
 			}
 
@@ -188,7 +188,7 @@ namespace Spine.Unity.Examples {
 				// (Button) Match Separators count
 				if (separatorNamesProp != null) {
 					int currentRenderers = 0;
-					foreach (var r in componentRenderers) {
+					foreach (SkeletonPartsRenderer r in componentRenderers) {
 						if (r != null)
 							currentRenderers++;
 					}
@@ -214,7 +214,7 @@ namespace Spine.Unity.Examples {
 								// Do you really want to destroy all?
 								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")) {
-									foreach (var r in componentRenderers) {
+									foreach (SkeletonPartsRenderer r in componentRenderers) {
 										if (r != null)
 											Undo.DestroyObjectImmediate(r.gameObject);
 									}
@@ -251,7 +251,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		public void AddPartsRenderer (int count) {
-			var componentRenderers = component.partsRenderers;
+			List<SkeletonPartsRenderer> componentRenderers = component.partsRenderers;
 			bool emptyFound = componentRenderers.Contains(null);
 			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");
@@ -261,16 +261,16 @@ namespace Spine.Unity.Examples {
 			Undo.RegisterCompleteObjectUndo(component, "Add Parts Renderers");
 			for (int i = 0; i < count; i++) {
 				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.
 				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;
 
 				int prevSortingLayer = prevMeshRenderer.sortingLayerID;
@@ -283,17 +283,17 @@ namespace Spine.Unity.Examples {
 
 		/// <summary>Detects orphaned parts renderers and offers to delete them.</summary>
 		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))
 					orphans.Add(r);
 			}
 
 			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")) {
-					foreach (var o in orphans) {
+					foreach (SkeletonPartsRenderer o in orphans) {
 						Undo.DestroyObjectImmediate(o.gameObject);
 					}
 				}
@@ -303,8 +303,8 @@ namespace Spine.Unity.Examples {
 		#region SkeletonRenderer Context Menu Item
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Skeleton Render Separator")]
 		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");
 		}
@@ -312,8 +312,8 @@ namespace Spine.Unity.Examples {
 		// Validate
 		[MenuItem("CONTEXT/SkeletonRenderer/Add Skeleton Render Separator", true)]
 		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;
 			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 BlendMode BlendModeForMaterial (Material material) {
-			foreach (var pair in multiplyMaterials)
+			foreach (ReplacementMaterial pair in multiplyMaterials)
 				if (pair.material == material) return BlendMode.Multiply;
-			foreach (var pair in additiveMaterials)
+			foreach (ReplacementMaterial pair in additiveMaterials)
 				if (pair.material == material) return BlendMode.Additive;
-			foreach (var pair in screenMaterials)
+			foreach (ReplacementMaterial pair in screenMaterials)
 				if (pair.material == material) return BlendMode.Screen;
 			return BlendMode.Normal;
 		}
@@ -72,18 +72,18 @@ namespace Spine.Unity {
 
 			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++) {
-				var slot = slotsItems[slotIndex];
+				SlotData slot = slotsItems[slotIndex];
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 
 				skinEntries.Clear();
-				foreach (var skin in skeletonData.Skins)
+				foreach (Skin skin in skeletonData.Skins)
 					skin.GetAttachments(slotIndex, skinEntries);
 
-				foreach (var entry in skinEntries) {
+				foreach (Skin.SkinEntry entry in skinEntries) {
 					if (entry.Attachment is IHasTextureRegion) {
 						requiresBlendModeMaterials = true;
 						return true;
@@ -98,10 +98,10 @@ namespace Spine.Unity {
 			if (!requiresBlendModeMaterials)
 				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++) {
-				var slot = slotsItems[slotIndex];
+				SlotData slot = slotsItems[slotIndex];
 				if (slot.BlendMode == BlendMode.Normal) continue;
 				if (!applyAdditiveMaterial && slot.BlendMode == BlendMode.Additive) continue;
 
@@ -121,18 +121,18 @@ namespace Spine.Unity {
 					continue;
 
 				skinEntries.Clear();
-				foreach (var skin in skeletonData.Skins)
+				foreach (Skin skin in skeletonData.Skins)
 					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.Region != null) {
 							renderableAttachment.Region = CloneAtlasRegionWithMaterial(
 							(AtlasRegion)renderableAttachment.Region, replacementMaterials);
 						} else {
 							if (renderableAttachment.Sequence != null) {
-								var regions = renderableAttachment.Sequence.Regions;
+								TextureRegion[] regions = renderableAttachment.Sequence.Regions;
 								for (int i = 0; i < regions.Length; ++i) {
 									regions[i] = CloneAtlasRegionWithMaterial(
 										(AtlasRegion)regions[i], replacementMaterials);
@@ -145,9 +145,9 @@ namespace Spine.Unity {
 		}
 
 		protected AtlasRegion CloneAtlasRegionWithMaterial (AtlasRegion originalRegion, List<ReplacementMaterial> replacementMaterials) {
-			var newRegion = originalRegion.Clone();
+			AtlasRegion newRegion = originalRegion.Clone();
 			Material material = null;
-			foreach (var replacement in replacementMaterials) {
+			foreach (ReplacementMaterial replacement in replacementMaterials) {
 				if (replacement.pageName == originalRegion.page.name) {
 					material = replacement.material;
 					break;
@@ -155,7 +155,7 @@ namespace Spine.Unity {
 			}
 
 			AtlasPage originalPage = originalRegion.page;
-			var newPage = originalPage.Clone();
+			AtlasPage newPage = originalPage.Clone();
 			newPage.rendererObject = material;
 			newRegion.page = newPage;
 			return newRegion;

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

@@ -204,7 +204,7 @@ namespace Spine.Unity {
 				return null;
 
 			if (skeletonDataModifiers != null) {
-				foreach (var modifier in skeletonDataModifiers) {
+				foreach (SkeletonDataModifierAsset modifier in skeletonDataModifiers) {
 					if (modifier != null && !(isUpgradingBlendModeMaterials && modifier is BlendModeMaterialsAsset)) {
 						modifier.Apply(loadedSkeletonData);
 					}
@@ -253,11 +253,11 @@ namespace Spine.Unity {
 		}
 
 		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++) {
-				var aa = atlasAssets[i];
+				AtlasAssetBase aa = atlasAssets[i];
 				if (aa == null) continue;
-				var a = aa.GetAtlas();
+				Atlas a = aa.GetAtlas();
 				if (a == null) continue;
 				returnList.Add(a);
 			}
@@ -265,8 +265,8 @@ namespace Spine.Unity {
 		}
 
 		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
 				};
 				return binary.ReadSkeletonData(input);
@@ -274,8 +274,8 @@ namespace Spine.Unity {
 		}
 
 		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
 			};
 			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) {
 				try {
-					using (var memStream = new MemoryStream(asset.bytes)) {
+					using (MemoryStream memStream = new MemoryStream(asset.bytes)) {
 						fileVersion.rawVersion = SkeletonBinary.GetVersionString(memStream);
 					}
 				} catch (System.Exception e) {
@@ -126,7 +126,7 @@ namespace Spine.Unity {
 						return null;
 					}
 
-					var root = obj as Dictionary<string, object>;
+					Dictionary<string, object> root = obj as Dictionary<string, object>;
 					if (root == null) {
 						problemDescription = string.Format("'{0}' is not compatible JSON. Parser returned an incorrect type while parsing version info.", asset.name);
 						isSpineSkeletonData = false;
@@ -134,7 +134,7 @@ namespace Spine.Unity {
 					}
 
 					if (root.ContainsKey("skeleton")) {
-						var skeletonInfo = (Dictionary<string, object>)root["skeleton"];
+						Dictionary<string, object> skeletonInfo = (Dictionary<string, object>)root["skeleton"];
 						object jv;
 						skeletonInfo.TryGetValue("spine", out jv);
 						fileVersion.rawVersion = jv as string;
@@ -148,7 +148,7 @@ namespace Spine.Unity {
 				return null;
 			}
 
-			var versionSplit = fileVersion.rawVersion.Split('.');
+			string[] versionSplit = fileVersion.rawVersion.Split('.');
 			try {
 				fileVersion.version = new[]{ int.Parse(versionSplit[0], CultureInfo.InvariantCulture),
 									int.Parse(versionSplit[1], CultureInfo.InvariantCulture) };
@@ -194,7 +194,7 @@ namespace Spine.Unity {
 			info.compatibleVersions = (fileVersion.sourceType == SourceType.Binary) ? compatibleBinaryVersions
 				: compatibleJsonVersions;
 
-			foreach (var compatibleVersion in info.compatibleVersions) {
+			foreach (int[] compatibleVersion in info.compatibleVersions) {
 				bool majorMatch = fileVersion.version[0] == compatibleVersion[0];
 				bool minorMatch = fileVersion.version[1] == compatibleVersion[1];
 				if (majorMatch && minorMatch) {

部分文件因为文件数量过多而无法显示