Browse Source

[unity] Handle Unity 5.6

pharan 8 years ago
parent
commit
7392883e49
1 changed files with 6 additions and 1 deletions
  1. 6 1
      spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs

+ 6 - 1
spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs

@@ -1676,8 +1676,13 @@ namespace Spine.Unity.Editor {
 
 			const float endCapSize = 0.05f;
 			Vector3 firstPoint = m.MultiplyPoint(new Vector3(pv[2], pv[3]));
+			#if UNITY_5_6_OR_NEWER
+			Handles.DotHandleCap(0, firstPoint, Quaternion.identity, endCapSize * HandleUtility.GetHandleSize(firstPoint), EventType.Ignore);
+			#else
 			Handles.DotCap(0, firstPoint, Quaternion.identity, endCapSize * HandleUtility.GetHandleSize(firstPoint));
-			//			if (!p.Closed) Handles.DotCap(0, m.MultiplyPoint(new Vector3(pv[n - 4], pv[n - 3])), q, endCapSize);
+			#endif
+
+//			if (!p.Closed) Handles.DotCap(0, m.MultiplyPoint(new Vector3(pv[n - 4], pv[n - 3])), q, endCapSize);
 			if (includeName) Handles.Label(firstPoint + new Vector3(0,0.1f), p.Name, PathNameStyle);
 
 			Handles.color = ocolor;