Beispiel #1
0
 void OnEndDrag()
 {
     isDragging = false;
     SetScaleAuto();
     MeshEdit.selMesh.UpdateColliderMesh();
     MeshEdit.SaveUndoState();
     //transform.localRotation = Quaternion.identity;
 }
Beispiel #2
0
    public void EndSelection()
    {
        if (isSelecting)
        {
            isSelecting   = false;
            image.enabled = false;

            foreach (ISelectable point in MeshEdit.selMesh.GetAllPoints())
            {
                Vector2 screenPos = Camera.main.WorldToScreenPoint(point.Pos);
                Rect    test      = CornersToRect();
                if (test.Contains(screenPos))
                {
                    point.Selected = true;
                }
            }
            transformGizmo.SetPositionAuto();
            transformGizmo.OnSelectionChange();
            MeshEdit.SaveUndoState();
        }
    }