If statement to ask if a point is walkable on a grid graph

Hello, how do I write an if statement to ask if a point is walkable for a grid graph?
I already have Aaron’s lovely code for recast graph:
if (AstarPath.active.data.recastGraph.PointOnNavmesh(rallyPoint, NNConstraint.Walkable) == null)

But the solution is not as simple as substituting the gridGraph for recastGraph

the documentation says IsPointOnNavmesh(point) is an inherited public member for grid graphs.
if (AstarPath.active.data.gridGraph.IsPointOnNavmesh(rallyPoint) == false)
gave ‘gridGraph’ does not contain a definition for ‘IsPointOnNavmesh’

bool walkable = AstarPath.active.IsPointOnNavmesh(rallyPoint);
said AstarPath does not contain a definition for ‘IsPointOnNavmesh’ even though the documentation clearly labels IsPointOnNavmesh as one of AstarPath public methods.

Hi

Are you using the latest version?

I am on V5.1.1 I saw that you made V5.1.2 this week. I have not updated yet.

now I am on v5.1.2
if (AstarPath.active.data.gridGraph.IsPointOnNavmesh(rallyPoint) == false) works now

1 Like