NavGrid Apply Tile Costs
Applies per-tile traversal costs to a NavGrid from a tilemap using explicit tile mappings.
| Parameter | Description |
|---|---|
| NavGrid | NavGrid to modify. |
| Tilemap | Tilemap to read tiles from. |
| Mappings | Tile-to-cost mappings to apply. |
| Apply Default For Unmapped | If true, uses Default Cost for tiles not in mappings. |
| Default Cost | Cost used for unmapped tiles when default is enabled. |
| Only Walkable | If true, only writes cost on walkable cells. |
| Write Mode | How to combine with existing cost (Set, Add, Max, Min). |
Example
- Map
MudTileto higher cost andRoadTileto lower cost. - Set Write Mode to
Maxso costs only increase where needed. - Run before pathfinding so A* can prefer cheaper routes.