mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] SkeletonUtility minor cleanup.
This commit is contained in:
parent
0a8a083cad
commit
b6e7797282
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user