mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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);
|
bool isOverrideMode = mode.enumValueIndex == 1;
|
||||||
EditorGUILayout.PropertyField(position);
|
using (new EditorGUI.DisabledGroupScope(isOverrideMode))
|
||||||
|
EditorGUILayout.PropertyField(zPosition);
|
||||||
|
EditorGUILayout.PropertyField(position, new GUIContent("XY Position"));
|
||||||
EditorGUILayout.PropertyField(rotation);
|
EditorGUILayout.PropertyField(rotation);
|
||||||
EditorGUILayout.PropertyField(scale);
|
EditorGUILayout.PropertyField(scale);
|
||||||
|
|
||||||
|
|||||||
@ -130,7 +130,8 @@ namespace Spine.Unity {
|
|||||||
switch (phase) {
|
switch (phase) {
|
||||||
case UpdatePhase.Local:
|
case UpdatePhase.Local:
|
||||||
if (position)
|
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 (rotation) {
|
||||||
if (bone.Data.TransformMode.InheritsRotation()) {
|
if (bone.Data.TransformMode.InheritsRotation()) {
|
||||||
@ -149,7 +150,8 @@ namespace Spine.Unity {
|
|||||||
case UpdatePhase.World:
|
case UpdatePhase.World:
|
||||||
case UpdatePhase.Complete:
|
case UpdatePhase.Complete:
|
||||||
if (position)
|
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 (rotation) {
|
||||||
if (bone.Data.TransformMode.InheritsRotation()) {
|
if (bone.Data.TransformMode.InheritsRotation()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user