protected override void OnSceneGUI(NavMeshPainter targetPainter) { NavMeshEditorUtils.ClearBrush(); var t = target as NavMeshBoxTool; if (t == null) { return; } if (m_IsDragging) { NavMeshEditorUtils.DrawBounds(t.bounds, Color.blue); } else { NavMeshEditorUtils.DrawWireCube(t.beginPos, new Vector3(1, t.bottomHeight + t.topHeight, 1), Color.blue); } if (Event.current.type == EventType.MouseUp) { if (m_IsDragging) { m_IsDragging = false; ApplyPaint(); } } }
protected override void OnSceneGUI(NavMeshPainter targetPainter) { NavMeshEditorUtils.ClearBrush(); var t = target as NavMeshLineTool; if (t == null) { return; } if (m_CurrentState == State.Drag) { DrawArea(t, Color.blue); } else { NavMeshEditorUtils.DrawWireCube(t.beginPos, new Vector3(t.width, t.height, t.width), Color.blue); } if (Event.current.type == EventType.MouseUp) { if (m_CurrentState == State.Drag) { m_CurrentState = State.None; ApplyPaint(); } } }