public void RenderKnob(Vector3[] corners, int sel_index) { Vector3[] gui_knobs = BuildKnobs(corners); for (int i = 0; i < gui_knobs.Length; ++i) { Vector3[] rect = MathTool.GetRect(gui_knobs[i], MathTool.s_knob_half_size); if (MathTool.ClipRect(m_view_rect, rect)) { Color color = (i == sel_index ? Color.yellow : Color.green); Handles.DrawSolidRectangleWithOutline(rect, color, color); } } }