private void ProcessMouseActions() { PointedTriangle = null; PointedLine = null; var pointingUv = RayCastVertexIsPointed(); if (_dragging) { MeshTool.ManageDragging(); } if (!_dragging) { if (pointingUv && _currentUv <= editedMesh.meshPoints[0].vertices.Count) { var pointedVx = editedMesh.meshPoints[0]; if (_currentUv == pointedVx.vertices.Count) { _currentUv--; } if ((SelectedUv != null) && (SelectedUv.meshPoint == pointedVx) && (!_selectingUVbyNumber)) { PointedUv = SelectedUv; } else { PointedUv = pointedVx.vertices[_currentUv]; } if (EditorInputManager.GetMouseButtonDown(0)) { AssignSelected(PointedUv); } } var t = MeshTool; if (t.ShowVertices && PointedUv != null) { if (t.MouseEventPointedVertex()) { EditedMesh.SetLastPointed(PointedUv); } else { EditedMesh.ClearLastPointed(); } } else if (t.ShowLines && PointedLine != null) { if (t.MouseEventPointedLine()) { EditedMesh.SetLastPointed(PointedLine); } else { EditedMesh.ClearLastPointed(); } } else if (t.ShowTriangles && PointedTriangle != null) { if (t.MouseEventPointedTriangle()) { EditedMesh.SetLastPointed(PointedTriangle); } else { EditedMesh.ClearLastPointed(); } } else { t.MouseEventPointedNothing(); EditedMesh.ClearLastPointed(); } } }
void RAYCAST_SELECT_MOUSEedit() { PointedTris = null; PointedLine = null; bool pointingUV = Raycast_VertexIsPointed(); if (_dragging) { MeshTool.ManageDragging(); } if (!_dragging) { if ((pointingUV) && (currentUV <= edMesh.meshPoints[0].uvpoints.Count)) { var pointedVX = edMesh.meshPoints[0]; if (currentUV == pointedVX.uvpoints.Count) { currentUV--; } if ((SelectedUV != null) && (SelectedUV.meshPoint == pointedVX) && (!SelectingUVbyNumber)) { PointedUV = SelectedUV; } else { PointedUV = pointedVX.uvpoints[currentUV]; } if (EditorInputManager.GetMouseButtonDown(0)) { AssignSelected(PointedUV); } } MeshToolBase t = MeshTool; if ((t.ShowVertices) && (PointedUV != null)) { if (t.MouseEventPointedVertex()) { EditedMesh.SetLastPointed(PointedUV); } else { EditedMesh.ClearLastPointed(); } } else if ((t.ShowLines) && (PointedLine != null)) { if (t.MouseEventPointedLine()) { EditedMesh.SetLastPointed(PointedLine); } else { EditedMesh.ClearLastPointed(); } } else if ((t.ShowTriangles) && (PointedTris != null)) { if (t.MouseEventPointedTriangle()) { EditedMesh.SetLastPointed(PointedTris); } else { EditedMesh.ClearLastPointed(); } } else { t.MouseEventPointedNothing(); EditedMesh.ClearLastPointed(); } } }