protected override void Grab(Vector3 position) { if (VertexOffsets != null) { VertexOffsets.Clear(); } else { VertexOffsets = new Dictionary <MeshEditor.VertexGroup, Vector3>(); } if (HeldFaces != null) { HeldFaces.Clear(); } else { HeldFaces = new List <MeshEditor.Face>(); } foreach (var e in FindObjectOfType <SelectionTool>().Selection) { if (e is MeshEditor.Face) { foreach (var g in e.Editor.ExtrudeFace(e as MeshEditor.Face)) { if (VertexOffsets.ContainsKey(g)) { return; } VertexOffsets.Add(g, g.WorldPosition - transform.position); } } } }