public void BeginEdit()
        {
            m_selection = gameObject.GetComponent <PBPolyShapeSelection>();
            if (m_selection == null)
            {
                m_selection = gameObject.AddComponent <PBPolyShapeSelection>();
            }
            else
            {
                m_selection.Clear();
            }

            m_isEditing = true;
        }
Esempio n. 2
0
 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);
     }
 }