Find any accessible path using MultiTargetPath

I have an object on a graph that has points around it and I want to see if any of the points are reachable from a single starting point. The problem I am having is that if a path to all of the end points is not found then it just returns an error : Error: Couldn’t find nodes close to the all of the end points. Even using path.pathsForAll = false; does not help. I am trying to use MultiTargetPath just because its convenient, should I be trying a separate path to each endpoint? If so it seems a pity since MultiTargetPath is already doing all of that.

Just noticed that using path.pathsForAll = false it seems that when there is an error it means it could not find any accessible points. Is this reliable and intended behaviour?

Hi

If you just want to know if the points are reachable then you can use PathUtilities.IsPathPossible instead which is much faster and easier to use.
See PathUtilities - A* Pathfinding Project

Yes, it will return an error if and only if it could not find any valid path.
You can check the path.targetsFound array to get the result for each individual target point (if pathsForAll = false then it will be true for at most one target however).

Thanks for the reply! I will try PathUtilities since the MultiTargetPath does seem a bit slow.