---
title: Path(ReadOnlySpan<Vector2>, float)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/terraintools/terrainregion/path
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/terraintools/terrainregion/path.md
last_updated: 2026-10-20
generated_at: 2026-11-11T15:46:39.967Z
locale: en-us
---

# Path(ReadOnlySpan<Vector2>, float)

> Creates a corridor of a given width along a polyline, such as a road or a river.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.TerrainTools](/engine/7000.0/script-reference/unityeditor/terraintools.md)
* **Assembly:** UnityEditor

```csharp
public static TerrainRegion Path(ReadOnlySpan<Vector2> points, float width)
```

### Parameters

**** (\[ReadOnlySpan\<Vector2>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The points of the polyline in meters. At least two. The region keeps its own copy.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The full width of the corridor in meters. Must be greater than zero.

### Returns

| Type                                                                                       | Description     |
| ------------------------------------------------------------------------------------------ | --------------- |
| [TerrainRegion](/engine/7000.0/script-reference/unityeditor/terraintools/terrainregion.md) | The new region. |

### Remarks

A position belongs to the corridor when it lies closer than half of `width` to any segment of the polyline, so the ends and the bends of the corridor are rounded. Repeated points are allowed.
