public override void SetSelection(MeshSelection selection) { m_edgeSelection.Clear(); m_selection.Clear(); foreach (KeyValuePair <ProBuilderMesh, IList <Edge> > kvp in selection.SelectedEdges) { m_edgeSelection.Add(kvp.Key, kvp.Value); } }
public override MeshSelection ClearSelection() { MeshSelection selection = new MeshSelection(); foreach (ProBuilderMesh mesh in m_edgeSelection.Meshes) { selection.UnselectedEdges.Add(mesh, m_edgeSelection.GetEdges(mesh).ToArray()); } m_edgeSelection.Clear(); m_selection.Clear(); if (selection.UnselectedEdges.Count > 0) { return(selection); } return(null); }
public override void SetSelection(MeshSelection selection) { m_edgeSelection.Clear(); m_selection.Clear(); if (selection != null) { selection = selection.ToEdges(false); foreach (KeyValuePair <GameObject, IList <Edge> > kvp in selection.SelectedEdges) { PBMesh pbMesh = kvp.Key.GetComponent <PBMesh>(); if (pbMesh.IsMarkedAsDestroyed) { continue; } m_edgeSelection.Add(kvp.Key.GetComponent <ProBuilderMesh>(), kvp.Value); } } }