To find a path between points A and B, you must:
1) Get an object of type
Path by calling the
method. This method will only create an instance of
Nav3DPathfindingManager.PrefetchPath(Vector3 _PointA, Vector3 _PointB)
Path and register it with Nav3D, but no pathfinding will be performed.
2) On the created
Path object, call the method:
UpdatePath( Vector3? _Start = null, Vector3? _Goal = null, int? _Timeout = null, bool? _Smooth = null, Action _OnSuccess = null, Action<PathfindingError> _OnFail = null )
Values of overloaded parameters:
Vector3? _Start– starting point of the path. The parameter must be passed if you want to change the starting point of the path.
Vector3? _Goal– the end point of the path. The parameter must be passed if you want to change the end point of the path.
int? _Timeout– maximum path search time. In case the path search takes longer, the _OnFail callback will be executed if it is not null.
bool? _Smooth = null– whether it is necessary to smooth the found path.
Action _OnSuccess= null – callback that will be called after successful path finding
Action _OnFailis a callback that will be called if the path could not be found for any reason.