Immediate Mode Draw.Polyline working in play mode but not edit mode
In this example Draw.Polyline only appears to draw in play mode and not edit mode, while Draw.Line works in both:
using UnityEngine; using Shapes; [ExecuteAlways] public class PolylineTest : ImmediateModeShapeDrawer { public bool usePolyline; public float thickness = 0.2f; public override void DrawShapes(Camera cam) { using (var path = new PolylinePath()) using (Draw.Command(cam)) { Draw.ResetAllDrawStates(); path.AddPoint(new Vector3(0, 0, 1), thickness, Color.blue); path.AddPoint(new Vector3(0, 0, -1), thickness, Color.green); if (usePolyline) { Draw.Polyline(path, 1); } else { Draw.Line(path[0].point, path[1].point, path[0].thickness, path[0].color, path[1].color); } } } }
In case it matters, I have Immediate mode instancing disabled in settings, otherwise all default.
fixed in 3.0.1