private void FindPath(Vector3 targetPos) { NavigationNode start = VoronoiGraphBuilder.Instance.GetNearestNavNode(myObject.transform.position); NavigationNode end = VoronoiGraphBuilder.Instance.GetNearestNavNode(targetPos); path = AstarNavigator.GetPath(start, end); }
public void FindPath() { path = AstarNavigator.GetPath(startNode, endNode); Debug.Log(path.Count); }