Odd. That should work.
Do you think you could verify that when you set A* Inspector -> Settings -> Graph Coloring to “Areas” then the two regions you are interested in show up in different colors?
This looks very strange.
The cyan line is supposed to be at the center of a node… but it doesn’t look like that at all.
Do you by any chance have multiple graphs in the scene? Are you updating them in some way? Do you have off-mesh links?
Ah. So when you call GetNearest it will find the closest node on any graph.
You will want to specify which graph to use.
I assume you have configured the Seeker component with which graph is valid for each agent.
var nn = NNConstraint.Default;
nn.graphMask = seeker.graphMask;
var ... = AstarPath.active.GetNearest(somePoint, nn);