private void updateForwardFrontier(Node node, float nodeScore) { #if DEBUG_PATHFINDING if (showDebug) { DebugDrawer.Draw(new Vector2Int(node.parentA.x, node.parentA.y), new Vector2Int(node.x, node.y), Color.white); DebugDrawer.DrawCube(new Vector2Int(node.x, node.y), Vector2Int.one, Color.white); } #endif if (node.isClosedB()) { var pathLength = node.costB + nodeScore; if (bestPathLength > pathLength) { bestPathLength = pathLength; middleNode = node; } } }