private void Awake() { destination = new Vector3(0f, 0f, 0f); navigationMesh = navigationMeshObject?.GetComponent <NavigationMeshComponent>() ?? throw new UnityException("Navigation mesh is missing required Navigation Mesh Component"); pathMapper = new AStarPathMapper(navigationMesh); }
public AStarPathMapper(NavigationMeshComponent navMesh) { this.navigationMesh = navMesh; }