浏览代码

[unity] SkeletonUtility minor cleanup.

pharan 8 年之前
父节点
当前提交
b6e7797282

+ 2 - 2
spine-unity/Assets/spine-unity/SkeletonUtility/Editor/SkeletonUtilityInspector.cs

@@ -132,8 +132,8 @@ namespace Spine.Unity.Editor {
 					skeleton.FlipY = EditorGUILayout.ToggleLeft("skeleton.FlipY", skeleton.FlipY);
 					requireRepaint |= EditorGUI.EndChangeCheck();
 
-					foreach (var t in skeleton.IkConstraints)
-						EditorGUILayout.LabelField(t.Data.Name + " " + t.Mix + " " + t.Target.Data.Name);
+//					foreach (var t in skeleton.IkConstraints)
+//						EditorGUILayout.LabelField(t.Data.Name + " " + t.Mix + " " + t.Target.Data.Name);
 
 					showSlots.target = EditorGUILayout.Foldout(showSlots.target, SlotsRootLabel);
 					if (showSlots.faded > 0) {

+ 4 - 3
spine-unity/Assets/spine-unity/SkeletonUtility/SkeletonUtility.cs

@@ -110,12 +110,13 @@ namespace Spine.Unity {
 		public Transform boneRoot;
 
 		void Update () {
-			if (boneRoot != null && skeletonRenderer.skeleton != null) {
+			var skeleton = skeletonRenderer.skeleton;
+			if (boneRoot != null && skeleton != null) {
 				Vector3 flipScale = Vector3.one;
-				if (skeletonRenderer.skeleton.FlipX)
+				if (skeleton.FlipX)
 					flipScale.x = -1;
 
-				if (skeletonRenderer.skeleton.FlipY)
+				if (skeleton.FlipY)
 					flipScale.y = -1;
 
 				boneRoot.localScale = flipScale;