mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
SkeletonUtilityBone v3.0 fix for basic cases.
This commit is contained in:
parent
a964ea71a6
commit
4f6fd8aa48
@ -12,7 +12,9 @@ using Spine;
|
|||||||
|
|
||||||
[CustomEditor(typeof(SkeletonUtilityBone)), CanEditMultipleObjects]
|
[CustomEditor(typeof(SkeletonUtilityBone)), CanEditMultipleObjects]
|
||||||
public class SkeletonUtilityBoneInspector : Editor {
|
public class SkeletonUtilityBoneInspector : Editor {
|
||||||
SerializedProperty mode, boneName, zPosition, position, rotation, scale, overrideAlpha, parentReference, flip, flipX;
|
SerializedProperty mode, boneName, zPosition, position, rotation, scale, overrideAlpha, parentReference;
|
||||||
|
// MITCH
|
||||||
|
// SerializedProperty flip, flipX;
|
||||||
|
|
||||||
//multi selected flags
|
//multi selected flags
|
||||||
bool containsFollows, containsOverrides, multiObject;
|
bool containsFollows, containsOverrides, multiObject;
|
||||||
@ -34,8 +36,10 @@ public class SkeletonUtilityBoneInspector : Editor {
|
|||||||
scale = this.serializedObject.FindProperty("scale");
|
scale = this.serializedObject.FindProperty("scale");
|
||||||
overrideAlpha = this.serializedObject.FindProperty("overrideAlpha");
|
overrideAlpha = this.serializedObject.FindProperty("overrideAlpha");
|
||||||
parentReference = this.serializedObject.FindProperty("parentReference");
|
parentReference = this.serializedObject.FindProperty("parentReference");
|
||||||
flip = this.serializedObject.FindProperty("flip");
|
|
||||||
flipX = this.serializedObject.FindProperty("flipX");
|
// MITCH
|
||||||
|
// flip = this.serializedObject.FindProperty("flip");
|
||||||
|
// flipX = this.serializedObject.FindProperty("flipX");
|
||||||
|
|
||||||
EvaluateFlags();
|
EvaluateFlags();
|
||||||
|
|
||||||
@ -144,22 +148,24 @@ public class SkeletonUtilityBoneInspector : Editor {
|
|||||||
EditorGUILayout.PropertyField(position);
|
EditorGUILayout.PropertyField(position);
|
||||||
EditorGUILayout.PropertyField(rotation);
|
EditorGUILayout.PropertyField(rotation);
|
||||||
EditorGUILayout.PropertyField(scale);
|
EditorGUILayout.PropertyField(scale);
|
||||||
EditorGUILayout.PropertyField(flip);
|
// MITCH
|
||||||
|
// EditorGUILayout.PropertyField(flip);
|
||||||
|
|
||||||
EditorGUI.BeginDisabledGroup(containsFollows);
|
EditorGUI.BeginDisabledGroup(containsFollows);
|
||||||
{
|
{
|
||||||
EditorGUILayout.PropertyField(overrideAlpha);
|
EditorGUILayout.PropertyField(overrideAlpha);
|
||||||
EditorGUILayout.PropertyField(parentReference);
|
EditorGUILayout.PropertyField(parentReference);
|
||||||
|
|
||||||
EditorGUI.BeginDisabledGroup(multiObject || !flip.boolValue);
|
// MITCH
|
||||||
{
|
// EditorGUI.BeginDisabledGroup(multiObject || !flip.boolValue);
|
||||||
EditorGUI.BeginChangeCheck();
|
// {
|
||||||
EditorGUILayout.PropertyField(flipX);
|
// EditorGUI.BeginChangeCheck();
|
||||||
if (EditorGUI.EndChangeCheck()) {
|
// EditorGUILayout.PropertyField(flipX);
|
||||||
FlipX(flipX.boolValue);
|
// if (EditorGUI.EndChangeCheck()) {
|
||||||
}
|
// FlipX(flipX.boolValue);
|
||||||
}
|
// }
|
||||||
EditorGUI.EndDisabledGroup();
|
// }
|
||||||
|
// EditorGUI.EndDisabledGroup();
|
||||||
|
|
||||||
}
|
}
|
||||||
EditorGUI.EndDisabledGroup();
|
EditorGUI.EndDisabledGroup();
|
||||||
@ -226,12 +232,13 @@ public class SkeletonUtilityBoneInspector : Editor {
|
|||||||
serializedObject.ApplyModifiedProperties();
|
serializedObject.ApplyModifiedProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlipX (bool state) {
|
// MITCH
|
||||||
utilityBone.FlipX(state);
|
// void FlipX (bool state) {
|
||||||
if (Application.isPlaying == false) {
|
// utilityBone.FlipX(state);
|
||||||
skeletonUtility.skeletonAnimation.LateUpdate();
|
// if (Application.isPlaying == false) {
|
||||||
}
|
// skeletonUtility.skeletonAnimation.LateUpdate();
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
void BoneSelectorContextMenu (string current, ExposedList<Bone> bones, string topValue, GenericMenu.MenuFunction2 callback) {
|
void BoneSelectorContextMenu (string current, ExposedList<Bone> bones, string topValue, GenericMenu.MenuFunction2 callback) {
|
||||||
GenericMenu menu = new GenericMenu();
|
GenericMenu menu = new GenericMenu();
|
||||||
@ -329,7 +336,7 @@ public class SkeletonUtilityBoneInspector : Editor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttachRigidbody (SkeletonUtilityBone utilBone) {
|
static void AttachRigidbody (SkeletonUtilityBone utilBone) {
|
||||||
if (utilBone.GetComponent<Collider>() == null) {
|
if (utilBone.GetComponent<Collider>() == null) {
|
||||||
if (utilBone.bone.Data.Length == 0) {
|
if (utilBone.bone.Data.Length == 0) {
|
||||||
SphereCollider sphere = utilBone.gameObject.AddComponent<SphereCollider>();
|
SphereCollider sphere = utilBone.gameObject.AddComponent<SphereCollider>();
|
||||||
|
|||||||
@ -32,6 +32,8 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
public bool position;
|
public bool position;
|
||||||
public bool rotation;
|
public bool rotation;
|
||||||
public bool scale;
|
public bool scale;
|
||||||
|
// MITCH : remove flipX
|
||||||
|
// Kept these fields public to retain serialization. Probably remove eventually?
|
||||||
public bool flip;
|
public bool flip;
|
||||||
public bool flipX;
|
public bool flipX;
|
||||||
[Range(0f, 1f)]
|
[Range(0f, 1f)]
|
||||||
@ -40,18 +42,23 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
/// <summary>If a bone isn't set, boneName is used to find the bone.</summary>
|
/// <summary>If a bone isn't set, boneName is used to find the bone.</summary>
|
||||||
public String boneName;
|
public String boneName;
|
||||||
public Transform parentReference;
|
public Transform parentReference;
|
||||||
[HideInInspector]
|
|
||||||
|
[System.NonSerialized]
|
||||||
public bool transformLerpComplete;
|
public bool transformLerpComplete;
|
||||||
|
|
||||||
protected Transform cachedTransform;
|
protected Transform cachedTransform;
|
||||||
protected Transform skeletonTransform;
|
protected Transform skeletonTransform;
|
||||||
|
|
||||||
public bool NonUniformScaleWarning {
|
// MITCH : nonuniform scale
|
||||||
get {
|
// private bool nonUniformScaleWarning;
|
||||||
return nonUniformScaleWarning;
|
// public bool NonUniformScaleWarning {
|
||||||
}
|
// get { return nonUniformScaleWarning; }
|
||||||
}
|
// }
|
||||||
|
|
||||||
private bool nonUniformScaleWarning;
|
private bool disableInheritScaleWarning;
|
||||||
|
public bool DisableInheritScaleWarning {
|
||||||
|
get { return disableInheritScaleWarning; }
|
||||||
|
}
|
||||||
|
|
||||||
public void Reset () {
|
public void Reset () {
|
||||||
bone = null;
|
bone = null;
|
||||||
@ -60,10 +67,8 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
if (!valid)
|
if (!valid)
|
||||||
return;
|
return;
|
||||||
skeletonTransform = skeletonUtility.transform;
|
skeletonTransform = skeletonUtility.transform;
|
||||||
|
|
||||||
skeletonUtility.OnReset -= HandleOnReset;
|
skeletonUtility.OnReset -= HandleOnReset;
|
||||||
skeletonUtility.OnReset += HandleOnReset;
|
skeletonUtility.OnReset += HandleOnReset;
|
||||||
|
|
||||||
DoUpdate();
|
DoUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +79,6 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
skeletonUtility.RegisterBone(this);
|
skeletonUtility.RegisterBone(this);
|
||||||
|
|
||||||
skeletonUtility.OnReset += HandleOnReset;
|
skeletonUtility.OnReset += HandleOnReset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,13 +89,11 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
void OnDisable () {
|
void OnDisable () {
|
||||||
if (skeletonUtility != null) {
|
if (skeletonUtility != null) {
|
||||||
skeletonUtility.OnReset -= HandleOnReset;
|
skeletonUtility.OnReset -= HandleOnReset;
|
||||||
|
|
||||||
skeletonUtility.UnregisterBone(this);
|
skeletonUtility.UnregisterBone(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoUpdate () {
|
public void DoUpdate () {
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
Reset();
|
Reset();
|
||||||
return;
|
return;
|
||||||
@ -102,39 +104,34 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
if (bone == null) {
|
if (bone == null) {
|
||||||
if (boneName == null || boneName.Length == 0)
|
if (boneName == null || boneName.Length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bone = skeleton.FindBone(boneName);
|
bone = skeleton.FindBone(boneName);
|
||||||
|
|
||||||
if (bone == null) {
|
if (bone == null) {
|
||||||
Debug.LogError("Bone not found: " + boneName, this);
|
Debug.LogError("Bone not found: " + boneName, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float skeletonFlipRotation = (skeleton.flipX ^ skeleton.flipY) ? -1f : 1f;
|
float skeletonFlipRotation = (skeleton.flipX ^ skeleton.flipY) ? -1f : 1f;
|
||||||
|
|
||||||
float flipCompensation = 0;
|
// MITCH : remove flipX
|
||||||
|
// float flipCompensation = 0;
|
||||||
// MITCH
|
// if (flip && (flipX || (flipX != bone.flipX)) && bone.parent != null) {
|
||||||
//if (flip && (flipX || (flipX != bone.flipX)) && bone.parent != null) {
|
// flipCompensation = bone.parent.WorldRotation * -2;
|
||||||
// flipCompensation = bone.parent.WorldRotation * -2;
|
// }
|
||||||
//}
|
|
||||||
|
|
||||||
if (mode == Mode.Follow) {
|
if (mode == Mode.Follow) {
|
||||||
if (flip) {
|
// MITCH : remove flipX
|
||||||
// MITCH
|
// if (flip)
|
||||||
//flipX = bone.flipX;
|
// flipX = bone.flipX;
|
||||||
}
|
|
||||||
|
if (position)
|
||||||
|
|
||||||
if (position) {
|
|
||||||
cachedTransform.localPosition = new Vector3(bone.x, bone.y, 0);
|
cachedTransform.localPosition = new Vector3(bone.x, bone.y, 0);
|
||||||
}
|
|
||||||
|
|
||||||
if (rotation) {
|
if (rotation) {
|
||||||
|
|
||||||
if (bone.Data.InheritRotation) {
|
if (bone.Data.InheritRotation) {
|
||||||
// MITCH
|
// MITCH : remove flipX
|
||||||
//if (bone.FlipX) {
|
//if (bone.FlipX) {
|
||||||
// cachedTransform.localRotation = Quaternion.Euler(0, 180, bone.rotationIK - flipCompensation);
|
// cachedTransform.localRotation = Quaternion.Euler(0, 180, bone.rotationIK - flipCompensation);
|
||||||
//} else {
|
//} else {
|
||||||
@ -142,21 +139,18 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
//}
|
//}
|
||||||
} else {
|
} else {
|
||||||
Vector3 euler = skeletonTransform.rotation.eulerAngles;
|
Vector3 euler = skeletonTransform.rotation.eulerAngles;
|
||||||
cachedTransform.rotation = Quaternion.Euler(euler.x, euler.y, skeletonTransform.rotation.eulerAngles.z + (bone.WorldRotationX * skeletonFlipRotation));
|
cachedTransform.rotation = Quaternion.Euler(euler.x, euler.y, euler.z + (bone.WorldRotationX * skeletonFlipRotation));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scale) {
|
if (scale) {
|
||||||
cachedTransform.localScale = new Vector3(bone.scaleX, bone.scaleY, bone.WorldSignX);
|
cachedTransform.localScale = new Vector3(bone.scaleX, bone.scaleY, bone.WorldSignX);
|
||||||
|
// MITCH : nonuniform scale
|
||||||
nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
//nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
||||||
|
disableInheritScaleWarning = !bone.data.inheritScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (mode == Mode.Override) {
|
} else if (mode == Mode.Override) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (transformLerpComplete)
|
if (transformLerpComplete)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -167,21 +161,22 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rotation) {
|
if (rotation) {
|
||||||
float angle = Mathf.LerpAngle(bone.Rotation, cachedTransform.localRotation.eulerAngles.z, overrideAlpha) + flipCompensation;
|
float angle = Mathf.LerpAngle(bone.Rotation, cachedTransform.localRotation.eulerAngles.z, overrideAlpha);
|
||||||
|
|
||||||
if (flip) {
|
|
||||||
// MITCH
|
|
||||||
//if ((!flipX && bone.flipX)) {
|
|
||||||
// angle -= flipCompensation;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//TODO fix this...
|
|
||||||
if (angle >= 360)
|
|
||||||
angle -= 360;
|
|
||||||
else if (angle <= -360)
|
|
||||||
angle += 360;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// MITCH : remove flipX
|
||||||
|
// float angle = Mathf.LerpAngle(bone.Rotation, cachedTransform.localRotation.eulerAngles.z, overrideAlpha) + flipCompensation;
|
||||||
|
// if (flip) {
|
||||||
|
//
|
||||||
|
// if ((!flipX && bone.flipX)) {
|
||||||
|
// angle -= flipCompensation;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //TODO fix this...
|
||||||
|
// if (angle >= 360)
|
||||||
|
// angle -= 360;
|
||||||
|
// else if (angle <= -360)
|
||||||
|
// angle += 360;
|
||||||
|
// }
|
||||||
bone.Rotation = angle;
|
bone.Rotation = angle;
|
||||||
bone.AppliedRotation = angle;
|
bone.AppliedRotation = angle;
|
||||||
}
|
}
|
||||||
@ -189,16 +184,14 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
if (scale) {
|
if (scale) {
|
||||||
bone.scaleX = Mathf.Lerp(bone.scaleX, cachedTransform.localScale.x, overrideAlpha);
|
bone.scaleX = Mathf.Lerp(bone.scaleX, cachedTransform.localScale.x, overrideAlpha);
|
||||||
bone.scaleY = Mathf.Lerp(bone.scaleY, cachedTransform.localScale.y, overrideAlpha);
|
bone.scaleY = Mathf.Lerp(bone.scaleY, cachedTransform.localScale.y, overrideAlpha);
|
||||||
|
// MITCH : nonuniform scale
|
||||||
nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
//nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MITCH
|
// MITCH : remove flipX
|
||||||
//if (flip) {
|
//if (flip)
|
||||||
// bone.flipX = flipX;
|
// bone.flipX = flipX;
|
||||||
//}
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (transformLerpComplete)
|
if (transformLerpComplete)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -208,74 +201,84 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
bone.y = Mathf.Lerp(bone.y, pos.y, overrideAlpha);
|
bone.y = Mathf.Lerp(bone.y, pos.y, overrideAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MITCH
|
||||||
if (rotation) {
|
if (rotation) {
|
||||||
float angle = Mathf.LerpAngle(bone.Rotation, Quaternion.LookRotation(flipX ? Vector3.forward * -1 : Vector3.forward, parentReference.InverseTransformDirection(cachedTransform.up)).eulerAngles.z, overrideAlpha) + flipCompensation;
|
float angle = Mathf.LerpAngle(bone.Rotation, Quaternion.LookRotation(flipX ? Vector3.forward * -1 : Vector3.forward, parentReference.InverseTransformDirection(cachedTransform.up)).eulerAngles.z, overrideAlpha);
|
||||||
|
|
||||||
if (flip) {
|
|
||||||
// MITCH
|
|
||||||
//if ((!flipX && bone.flipX)) {
|
|
||||||
// angle -= flipCompensation;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//TODO fix this...
|
|
||||||
if (angle >= 360)
|
|
||||||
angle -= 360;
|
|
||||||
else if (angle <= -360)
|
|
||||||
angle += 360;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// MITCH : remove flipX
|
||||||
|
// float angle = Mathf.LerpAngle(bone.Rotation, Quaternion.LookRotation(flipX ? Vector3.forward * -1 : Vector3.forward, parentReference.InverseTransformDirection(cachedTransform.up)).eulerAngles.z, overrideAlpha) + flipCompensation;
|
||||||
|
// if (flip) {
|
||||||
|
//
|
||||||
|
// if ((!flipX && bone.flipX)) {
|
||||||
|
// angle -= flipCompensation;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //TODO fix this...
|
||||||
|
// if (angle >= 360)
|
||||||
|
// angle -= 360;
|
||||||
|
// else if (angle <= -360)
|
||||||
|
// angle += 360;
|
||||||
|
// }
|
||||||
bone.Rotation = angle;
|
bone.Rotation = angle;
|
||||||
bone.AppliedRotation = angle;
|
bone.AppliedRotation = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Something about this
|
|
||||||
if (scale) {
|
if (scale) {
|
||||||
bone.scaleX = Mathf.Lerp(bone.scaleX, cachedTransform.localScale.x, overrideAlpha);
|
bone.scaleX = Mathf.Lerp(bone.scaleX, cachedTransform.localScale.x, overrideAlpha);
|
||||||
bone.scaleY = Mathf.Lerp(bone.scaleY, cachedTransform.localScale.y, overrideAlpha);
|
bone.scaleY = Mathf.Lerp(bone.scaleY, cachedTransform.localScale.y, overrideAlpha);
|
||||||
|
// MITCH : nonuniform scale
|
||||||
nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
//nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MITCH
|
disableInheritScaleWarning = !bone.data.inheritScale;
|
||||||
//if (flip) {
|
|
||||||
|
// MITCH : remove flipX
|
||||||
|
//if (flip)
|
||||||
// bone.flipX = flipX;
|
// bone.flipX = flipX;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
transformLerpComplete = true;
|
transformLerpComplete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FlipX (bool state) {
|
// MITCH : remove flipX
|
||||||
if (state != flipX) {
|
// public void FlipX (bool state) {
|
||||||
flipX = state;
|
// if (state != flipX) {
|
||||||
if (flipX && Mathf.Abs(transform.localRotation.eulerAngles.y) > 90) {
|
// flipX = state;
|
||||||
skeletonUtility.skeletonAnimation.LateUpdate();
|
// if (flipX && Mathf.Abs(transform.localRotation.eulerAngles.y) > 90) {
|
||||||
return;
|
// skeletonUtility.skeletonAnimation.LateUpdate();
|
||||||
} else if (!flipX && Mathf.Abs(transform.localRotation.eulerAngles.y) < 90) {
|
// return;
|
||||||
skeletonUtility.skeletonAnimation.LateUpdate();
|
// } else if (!flipX && Mathf.Abs(transform.localRotation.eulerAngles.y) < 90) {
|
||||||
return;
|
// skeletonUtility.skeletonAnimation.LateUpdate();
|
||||||
}
|
// return;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
// MITCH
|
//
|
||||||
//bone.FlipX = state;
|
//
|
||||||
transform.RotateAround(transform.position, skeletonUtility.transform.up, 180);
|
// bone.FlipX = state;
|
||||||
Vector3 euler = transform.localRotation.eulerAngles;
|
// transform.RotateAround(transform.position, skeletonUtility.transform.up, 180);
|
||||||
euler.x = 0;
|
// Vector3 euler = transform.localRotation.eulerAngles;
|
||||||
// MITCH
|
// euler.x = 0;
|
||||||
//euler.y = bone.FlipX ? 180 : 0;
|
//
|
||||||
euler.y = 0;
|
// euler.y = bone.FlipX ? 180 : 0;
|
||||||
transform.localRotation = Quaternion.Euler(euler);
|
// euler.y = 0;
|
||||||
}
|
// transform.localRotation = Quaternion.Euler(euler);
|
||||||
|
// }
|
||||||
|
|
||||||
public void AddBoundingBox (string skinName, string slotName, string attachmentName) {
|
public void AddBoundingBox (string skinName, string slotName, string attachmentName) {
|
||||||
SkeletonUtility.AddBoundingBox(bone.skeleton, skinName, slotName, attachmentName, transform);
|
SkeletonUtility.AddBoundingBox(bone.skeleton, skinName, slotName, attachmentName, transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
void OnDrawGizmos () {
|
void OnDrawGizmos () {
|
||||||
if (NonUniformScaleWarning) {
|
// MITCH : nonuniform scale
|
||||||
Gizmos.DrawIcon(transform.position + new Vector3(0, 0.128f, 0), "icon-warning");
|
// if (NonUniformScaleWarning) {
|
||||||
}
|
// Gizmos.DrawIcon(transform.position + new Vector3(0, 0.128f, 0), "icon-warning");
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (DisableInheritScaleWarning)
|
||||||
|
Gizmos.DrawIcon(transform.position + new Vector3(0, 0.128f, 0), "icon-warning");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user