|
@@ -1824,11 +1824,7 @@ namespace Spine.Unity.Editor {
|
|
}
|
|
}
|
|
|
|
|
|
public static void DrawDot (Vector3 position, float size) {
|
|
public static void DrawDot (Vector3 position, float size) {
|
|
- #if UNITY_5_6_OR_NEWER
|
|
|
|
- Handles.DotHandleCap(0, position, Quaternion.identity, size * HandleUtility.GetHandleSize(position), EventType.Ignore);
|
|
|
|
- #else
|
|
|
|
- Handles.DotCap(0, position, Quaternion.identity, size * HandleUtility.GetHandleSize(position));
|
|
|
|
- #endif
|
|
|
|
|
|
+ Handles.DotHandleCap(0, position, Quaternion.identity, size * HandleUtility.GetHandleSize(position), EventType.Ignore); //Handles.DotCap(0, position, Quaternion.identity, size * HandleUtility.GetHandleSize(position));
|
|
}
|
|
}
|
|
|
|
|
|
public static void DrawBoundingBoxes (Transform transform, Skeleton skeleton) {
|
|
public static void DrawBoundingBoxes (Transform transform, Skeleton skeleton) {
|
|
@@ -1841,15 +1837,14 @@ namespace Spine.Unity.Editor {
|
|
public static void DrawBoundingBox (Slot slot, BoundingBoxAttachment box, Transform t) {
|
|
public static void DrawBoundingBox (Slot slot, BoundingBoxAttachment box, Transform t) {
|
|
if (box.Vertices.Length <= 2) return; // Handle cases where user creates a BoundingBoxAttachment but doesn't actually define it.
|
|
if (box.Vertices.Length <= 2) return; // Handle cases where user creates a BoundingBoxAttachment but doesn't actually define it.
|
|
|
|
|
|
- var worldVerts = new float[box.Vertices.Length];
|
|
|
|
|
|
+ var worldVerts = new float[box.WorldVerticesLength];
|
|
box.ComputeWorldVertices(slot, worldVerts);
|
|
box.ComputeWorldVertices(slot, worldVerts);
|
|
|
|
|
|
Handles.color = Color.green;
|
|
Handles.color = Color.green;
|
|
Vector3 lastVert = Vector3.zero;
|
|
Vector3 lastVert = Vector3.zero;
|
|
Vector3 vert = Vector3.zero;
|
|
Vector3 vert = Vector3.zero;
|
|
Vector3 firstVert = t.TransformPoint(new Vector3(worldVerts[0], worldVerts[1], 0));
|
|
Vector3 firstVert = t.TransformPoint(new Vector3(worldVerts[0], worldVerts[1], 0));
|
|
- int n = worldVerts.Length - 1;
|
|
|
|
- for (int i = 0; i < n; i += 2) {
|
|
|
|
|
|
+ for (int i = 0; i < worldVerts.Length; i += 2) {
|
|
vert.x = worldVerts[i];
|
|
vert.x = worldVerts[i];
|
|
vert.y = worldVerts[i + 1];
|
|
vert.y = worldVerts[i + 1];
|
|
vert.z = 0;
|
|
vert.z = 0;
|