private bool isGraphWalkable(NavGraph graph) { var nearestNode = graph.GetNearest(PositionToCheck); return nearestNode.node != null && nearestNode.node.Walkable; }