In my pathfinding script (javascript) I have a function in which I want to check if a point can be reached. I want to use IsPathPossible(), but Unity sais:
“No appropriate version of ‘Pathfinding.PathUtilities.IsPathPossible’ for the argument list ‘(Pathfinding.NNInfo, Pathfinding.NNInfo)’ was found.”
The function is in the same file as other pathfinding function which works fine. How do I use the PathUtilities?
Must I include some other scripts other than pathfinder?
// SCRIPT
import Pathfinding;
.
.
.
.
function isPatchClear(newTarget:GameObject) {
if (!Pathfinding.PathUtilities.IsPathPossible (AstarPath.active.GetNearest(transform.position, NNConstraint.Default), AstarPath.active.GetNearest(newTarget.transform.position, NNConstraint.Default))) {
Debug.Log (“Oh noes, there is no path between those nodes!”);
}
}