mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[unity] Fixed SkeletonutilityBone zPosition property having no effect. Closes #2255.
This commit is contained in:
parent
a5fc30cbf2
commit
85a972922a
@ -158,8 +158,10 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(zPosition);
|
||||
EditorGUILayout.PropertyField(position);
|
||||
bool isOverrideMode = mode.enumValueIndex == 1;
|
||||
using (new EditorGUI.DisabledGroupScope(isOverrideMode))
|
||||
EditorGUILayout.PropertyField(zPosition);
|
||||
EditorGUILayout.PropertyField(position, new GUIContent("XY Position"));
|
||||
EditorGUILayout.PropertyField(rotation);
|
||||
EditorGUILayout.PropertyField(scale);
|
||||
|
||||
|
||||
@ -130,7 +130,8 @@ namespace Spine.Unity {
|
||||
switch (phase) {
|
||||
case UpdatePhase.Local:
|
||||
if (position)
|
||||
thisTransform.localPosition = new Vector3(bone.X * positionScale, bone.Y * positionScale, 0);
|
||||
thisTransform.localPosition = new Vector3(bone.X * positionScale, bone.Y * positionScale,
|
||||
zPosition ? 0 : thisTransform.localPosition.z);
|
||||
|
||||
if (rotation) {
|
||||
if (bone.Data.TransformMode.InheritsRotation()) {
|
||||
@ -149,7 +150,8 @@ namespace Spine.Unity {
|
||||
case UpdatePhase.World:
|
||||
case UpdatePhase.Complete:
|
||||
if (position)
|
||||
thisTransform.localPosition = new Vector3(bone.AX * positionScale, bone.AY * positionScale, 0);
|
||||
thisTransform.localPosition = new Vector3(bone.AX * positionScale, bone.AY * positionScale,
|
||||
zPosition ? 0 : thisTransform.localPosition.z);
|
||||
|
||||
if (rotation) {
|
||||
if (bone.Data.TransformMode.InheritsRotation()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user