private void BeginEdit() { m_selection = gameObject.GetComponent <PBPolyShapeSelection>(); if (m_selection == null) { m_selection = gameObject.AddComponent <PBPolyShapeSelection>(); } m_selection.enabled = true; m_isEditing = true; Positions = Positions.ToList(); if (m_selection.Positions.Count == 0) { m_selection.Add(Vector3.zero); m_positions.Add(Vector3.zero); } }
public void AddVertex(Vector3 position) { if (!m_isEditing) { BeginEdit(); } m_selection.Add(position); }