skip to Main Content

map.cells: linearized array of (gridRows * gridColumns) dimensions containing cells

map.showGrid: toggles on/off hexagonal grid.

map.gridRows / map.gridColumns: dimensions of the grid.

map.gridColor: color for the grid. It accepts transparency.

map.gridMinDistance / gridMaxDistance: distances in world units from the camera to the map where the grid is visibile. Outside of this range, the grid will fade out gracefully.

map.enableCellHighlight: toggles on/off cell highlighting.

map.cellHighlightColor: color for the highlighting effect.

map.cellHighlighted: returns the Cell object currently highlighted.

map.cellHighlightedIndex: returns the index of the currently highlighted cell.

map.cellLastClickedIndex: returns the index of the last cell clicked.

map.GetCellindex(cell): returns the index of a given cell object.

map.ToggleCellSurface(cellIndex, visible, color, refreshGeometry): colorizes a cell by index according to visible and color parameters. Use refreshGeometry = true to ignore cached surfaces (if not sure, pass “false”).

map.ToggleCellSurface(cellIndex, visible, color, refreshGeometry, texture, textureScale, textureOffset, textureRotation): add a texture to a cell by index according to visible, color and texture parameters. Use refreshGeometry = true to ignore cached surfaces (if not sure, pass “false”).

map.HideCellSurface(cellIndex): programatically hides a colorized / textured cell.

map.CellFadeOut(cellIndex, color, duration): initiates a fading out effect on speficied cell with color and duration in seconds. When finished, the cell is hidden.

map.CellFadeOut(cells, color, duration): initiates a fading out effect on a group of cells with color and duration in seconds. When finished, the cell is hidden.

map.CellBlink(cellIndex, color, duration): initiates a blink effect on speficied cell with color and duration in seconds. The previous color is preserved.

map.CellBlink(cells, color, duration): initiates a blink effect on a group of cells with color and duration in seconds. The previous color is preserved.

map.CellFlash(cellIndex, color, duration): initiates a flash effect on speficied cell with color and duration in seconds. The previous color is preserved.

map.CellFlash(cells, color, duration): initiates a flash effect on a group of cells with color and duration in seconds. The previous color is preserved.

map.GetCellWorldPosition(cellIndex): returns center of the cell in world space coordinates (cell.center contains the local space coordinates).

map.GetCellVertexWorldPosition(cellIndex, vertexIndex): returns position of the specified vertex (0-5) of the cell in world space coordinates.

map.GetCell(localPosition): returns the cell which contains provided local coordiantes.

map.GetCellsInCountry(countryIndex): returns the cells belonging to a given country.

map.GetCellsInProvince(provinceIndex): returns the cells belonging to a given province.

map.GetCellCountry(cellIndex): returns the country index to which a cell belongs.

map.GetCellProvince(cellIndex): returns the province index to which a cell belongs.

map.GetCellNeighbours(cellIndex, …): returns a list of indices of cells that are neighbours or a given cell.

map.GetCellPathCost(cellIndex): returns the cost for crossing this cell computed in the last FindRoute function call.

map.GetCellAltitude(cellIndex): returns the altitude of a cell as it would be used by GetCellsByAltitude or path-finding methods.

map.GetCellsByAltitude(minAltitude, maxAltitude): returns a list of cells between min and max altitudes.

map.GetCellsWithinRadius(int cellIndex, int radius, List<int> cellIndices): returns the indices of cells found in a radius around cellIndex.

map.GetCellsWithinRectangle(int rowMin, int rowMax, int columnMin, int columnMax, List<int> cellIndices): returns the indices of cells found inside a given rectangle by row/column numbers.

map.GetCellsWithinCone(int cellIndex, Vector2 direction, float maxDistance, float angle, List<int>cellindices): returns the indices of cells found inside a cone starting at cellIndex in a given direction with a maximum distance.

map.GetCellsWithinDistanceKM(int cellIndex, float km, List<int> cellIndices): returns the indices of cells within km distance to another cell.

Back To Top