Get Graph Nodes within a box area

  • A* version: 4.2.15 (2020-03-30)
  • Unity version: 2022.3.10f1

Is there a way to get all GraphNodes within a box area?

Similar to AstarPath.active.GetNearest(), except instead of providing a position I provide a Bounds and it returns multiple NNInfos within those bounds

I’m wanting to be able to toggle whether the nodes within this gate are walkable, so that when the gate is opened NPC’s can pathfind through it

Screenshot 2025-08-26 040252

Hi

To update the graph, take a look at this page: Graph Updates during Runtime - A* Pathfinding Project

For finding all nodes in a rectangle, there’s this method: GetNodesInRegion - A* Pathfinding Project, but you should most likely take a look at the page linked above, instead.

1 Like

Thank you, I ended up going with DynamicGridObstacle to achieve what I wanted