public static void DrawLengthsXZ(Matrix4x4 transformation, Rect rect, Axes activeAxes = Axes.XYZ, Axes visibleAxes = Axes.XYZ, Axes selectedAxes = Axes.None) { using (var drawingScope = new UnityEditor.Handles.DrawingScope(SceneHandles.measureColor, transformation)) { DrawLengthsXZ(rect, activeAxes, visibleAxes, selectedAxes); } }
public static void RenderBoxMeasurements(Matrix4x4 transformation, Bounds bounds) { using (var drawingScope = new UnityEditor.Handles.DrawingScope(SceneHandles.measureColor, transformation)) { if (bounds.size.y != 0) { Measurements.DrawLengths(bounds); } else { var rect = new Rect { min = new Vector2(bounds.min[0], bounds.min[2]), max = new Vector2(bounds.max[0], bounds.max[2]) }; if (rect.width != 0 || rect.height != 0) { Measurements.DrawLengthsXZ(rect); } } } }