void OnSceneGUI() { Polygon p = target as Polygon; bool changed = fillEditor.DoSceneHandles(p.UseFill, p, p.Fill, p.transform); changed |= scenePointEditor.DoSceneHandles(closed: true, p, p.points, p.transform); if (changed) { p.UpdateMesh(true); p.UpdateAllMaterialProperties(); } }
void OnSceneGUI() { Polyline p = target as Polyline; scenePointEditor.useFlatThicknessHandles = p.Geometry == PolylineGeometry.Flat2D; scenePointEditor.hasEditThicknessMode = p.ThicknessSpace == ThicknessSpace.Meters; bool changed = scenePointEditor.DoSceneHandles(p.Closed, p, p.points, p.transform, p.Thickness, p.Color); if (changed) { p.UpdateMesh(force: true); } }
void OnSceneGUI() { Line l = target as Line; List <Vector3> pts = new List <Vector3>() { l.Start, l.End }; bool changed = scenePointEditor.DoSceneHandles(false, l, pts, l.transform); if (changed) { l.Start = pts[0]; l.End = pts[1]; } }