Beispiel #1
0
        void Deselect()
        {
            Gizmo.Detach();
            Gizmo.Visible = false;

            if (currentlySelected != null)
            {
                //nothing to do to unselect for vertices
            }
        }
        void Deselect()
        {
            Gizmo.Detach();
            Gizmo.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;
            }
        }