Beispiel #1
0
 protected override void Select(BoundsInt position)
 {
     if (grid != null)
     {
         GridSelection.Select(brushTarget, position);
         gridBrush.Select(grid, brushTarget, position);
     }
 }
 protected override void Select(BoundsInt position)
 {
     if (this.grid != null)
     {
         GridSelection.Select(this.brushTarget, position);
         this.gridBrush.Select(this.grid, this.brushTarget, position);
     }
 }
Beispiel #3
0
 public void OnEditModeEnd(IToolModeOwner owner)
 {
     if (EditMode.editMode != EditMode.SceneViewEditMode.GridMove && EditMode.editMode != EditMode.SceneViewEditMode.GridSelect)
     {
         GridSelection.Clear();
     }
     this.CallOnToolDeactivated();
     base.Repaint();
 }
Beispiel #4
0
 public static void Clear()
 {
     if (GridSelection.active)
     {
         GridSelection.selection.m_Position = default(BoundsInt);
         Selection.activeObject             = GridSelection.selection.m_PreviousSelection;
         if (GridSelection.gridSelectionChanged != null)
         {
             GridSelection.gridSelectionChanged();
         }
     }
 }
Beispiel #5
0
        public static void Select(UnityEngine.Object target, BoundsInt bounds)
        {
            GridSelection gridSelection = ScriptableObject.CreateInstance <GridSelection>();

            gridSelection.m_PreviousSelection = Selection.activeObject;
            gridSelection.m_Target            = (target as GameObject);
            gridSelection.m_Position          = bounds;
            Selection.activeObject            = gridSelection;
            if (GridSelection.gridSelectionChanged != null)
            {
                GridSelection.gridSelectionChanged();
            }
        }
Beispiel #6
0
        public static void Select(Object target, BoundsInt bounds)
        {
            GridSelection newSelection = CreateInstance <GridSelection>();

            newSelection.m_PreviousSelection = Selection.activeObject;
            newSelection.m_Target            = target as GameObject;
            newSelection.m_Position          = bounds;
            Selection.activeObject           = newSelection;
            if (gridSelectionChanged != null)
            {
                gridSelectionChanged();
            }
        }
Beispiel #7
0
 protected override void ClearGridSelection()
 {
     GridSelection.Clear();
 }