[unity] SkeletonUtility minor cleanup.

This commit is contained in:
pharan 2016-12-02 19:32:53 +08:00
parent 0a8a083cad
commit b6e7797282
2 changed files with 6 additions and 5 deletions

View File

@ -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) {

View File

@ -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;