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(); } } }
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(); } }