mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 13:19:08 +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);
|
skeleton.FlipY = EditorGUILayout.ToggleLeft("skeleton.FlipY", skeleton.FlipY);
|
||||||
requireRepaint |= EditorGUI.EndChangeCheck();
|
requireRepaint |= EditorGUI.EndChangeCheck();
|
||||||
|
|
||||||
foreach (var t in skeleton.IkConstraints)
|
// foreach (var t in skeleton.IkConstraints)
|
||||||
EditorGUILayout.LabelField(t.Data.Name + " " + t.Mix + " " + t.Target.Data.Name);
|
// EditorGUILayout.LabelField(t.Data.Name + " " + t.Mix + " " + t.Target.Data.Name);
|
||||||
|
|
||||||
showSlots.target = EditorGUILayout.Foldout(showSlots.target, SlotsRootLabel);
|
showSlots.target = EditorGUILayout.Foldout(showSlots.target, SlotsRootLabel);
|
||||||
if (showSlots.faded > 0) {
|
if (showSlots.faded > 0) {
|
||||||
|
|||||||
@ -110,12 +110,13 @@ namespace Spine.Unity {
|
|||||||
public Transform boneRoot;
|
public Transform boneRoot;
|
||||||
|
|
||||||
void Update () {
|
void Update () {
|
||||||
if (boneRoot != null && skeletonRenderer.skeleton != null) {
|
var skeleton = skeletonRenderer.skeleton;
|
||||||
|
if (boneRoot != null && skeleton != null) {
|
||||||
Vector3 flipScale = Vector3.one;
|
Vector3 flipScale = Vector3.one;
|
||||||
if (skeletonRenderer.skeleton.FlipX)
|
if (skeleton.FlipX)
|
||||||
flipScale.x = -1;
|
flipScale.x = -1;
|
||||||
|
|
||||||
if (skeletonRenderer.skeleton.FlipY)
|
if (skeleton.FlipY)
|
||||||
flipScale.y = -1;
|
flipScale.y = -1;
|
||||||
|
|
||||||
boneRoot.localScale = flipScale;
|
boneRoot.localScale = flipScale;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user