示例#1
0
        void Deselect()
        {
            Gizmo_OLD.Detach();
            Gizmo_OLD.Visible = false;

            if (currentlySelected != null)
            {
                OnDeselected.Invoke(currentlySelected.GetComponent <EditableVertex>());
            }
        }
示例#2
0
        public void Deselect()
        {
            Gizmo_OLD.Detach();
            Gizmo_OLD.Visible = false;

            //place currently selected back into mesh
            if (currentlySelected != null)
            {
                var selectedPrimitive = currentlySelected.GetComponent <EditablePrimitive>();
                var editableMesh      = LevelEditor.CurrentLevel.EditableLevelMesh.GetMaterialMesh(selectedPrimitive.Material);
                editableMesh.AddPrimitive(selectedPrimitive.info);
                editableMesh.UpdateMesh();
                OnDeselected.Invoke(selectedPrimitive);
                Destroy(currentlySelected);
                currentlySelected = null;
            }
        }