private void Select(MeshSelection meshSelection) { for (int index = 0; index < m_selection.Count; ++index) { ManualUVSelection selection = m_selection[index]; ManualUVSelection oldSelection = new ManualUVSelection(selection); selection.Clear(); if (meshSelection.HasVertices) { foreach (int i in meshSelection.GetIndices(selection.Mesh)) { selection.Vertices.Add(i); } } else if (meshSelection.HasEdges) { foreach (int i in meshSelection.GetEdges(selection.Mesh)) { selection.Edges.Add(i); } } else if (meshSelection.HasFaces) { foreach (int i in meshSelection.GetFaces(selection.Mesh)) { selection.Faces.Add(i); } } if (SelectionChanged != null) { SelectionChanged(selection); } } }