Skip to content

NavGrid Build From Tilemaps

Builds a NavGrid from Floor and Walls tilemaps.

Walkable cells are where a floor tile exists and no wall tile exists.

Parameter Description
Floor Floor tilemap to scan for walkable area.
Walls Wall tilemap to scan for blocked cells.
Bounds Optional cell bounds to scan. If empty, uses overlap of both tilemap bounds.
Write Zero Cost Array If true, initializes a Cost array with 0 for each cell.
Store NavGrid NavGrid asset to fill. If empty, a runtime NavGrid is created.

Example

  1. Set Floor and Walls tilemaps.
  2. Leave Bounds empty to use shared tilemap area.
  3. Store the result in a NavGrid variable.
  4. Use that grid in NavGrid Find Path.

See also