Hello,
I am trying to modify the grid in the 2d example scene using the code from the documentation
AstarPath.AddWorkItem(new AstarWorkItem(() => {
AstarPath.data.gridGraph.GetNode(x, y).Walkable = true;
AstarPath.data.gridGraph.CalculateConnectionsForCellAndNeighbours(x, y);
}));
It works fine with almost all nodes but if one of the x and y coordinate is 0 I get the following error:
IndexOutOfRangeException: Index was outside the bounds of the array.
Pathfinding.GridGraph.CalculateConnections (System.Int32 x, System.Int32 y) (at Assets/Standard Assets/AstarPathfindingProject/Generators/GridGenerator.cs:1466)
Pathfinding.GridGraph.CalculateConnectionsForCellAndNeighbours (System.Int32 x, System.Int32 y) (at Assets/Standard Assets/AstarPathfindingProject/Generators/GridGenerator.cs:1419)