computePath(from:to:)
Asynchronously requests a pathfind from a given position to the target position and waits for the path or a failure. If the function returns an empty path, the pathfind succeeded with no nodes (for example, the start and end positions are in the same place). If the function returns nil, the pathfinding failed to find a path.
Declaration
func computePath(from startPosition: SIMD3<Float>, to targetPosition: SIMD3<Float>) async -> [NavigationMeshResource.PathNode]?