1
Feature Requests / Grids 2D/TGS: Get Cell Indexes of cells on the outermost edges of a grid
« on: January 29, 2021, 06:09:42 AM »
This would be a helpful function for me.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
new void Update()
{
base.Update();
_grid.highlightMode = HIGHLIGHT_MODE.None;
_grid.HighlightCellRegion(_selectedCell.index, true);
}
_grid.CellFlash(_selectedCell.index, new Color32(54, 99, 99, 254), 6.567f);
_grid.highlightMode = HIGHLIGHT_MODE.None;
_grid.HighlightCellRegion(_selectedCell.index, true);
_grid.CellBlink(_selectedCell.index, new Color(54, 99, 99), 0.567f);
_grid.CellFadeOut(_selectedCell.index, new Color(54, 99, 99), 6.567f);
_grid.CellFlashOut(_selectedCell.index, new Color(54, 99, 99), 6.567f);
// Tried each one individually.
protected Dictionary<int, Bounds> _cellPositions = new Dictionary<int, Bounds>();
foreach(Cell cell in _grid.cells) {
Vector3 position = _grid.CellGetPosition(cell.index);
Vector3 boundsSize = new Vector3(0.32f, 0.32f, 1);
Bounds cellBounds = new Bounds(position, boundsSize);
_cellPositions[cell.index] = cellBounds;
}