# SegmentsInPath(IEnumerable<BezierPathSegment>, bool)

> Iterates through every segment in a list of path segments.

## Definition

* **Type:** Method
* **Namespace:** [Unity.VectorGraphics](/engine/6000.5/script-reference/unity/vectorgraphics.md)
* **Assembly:** UnityEngine.VectorGraphicsModule

```csharp
public static IEnumerable<BezierSegment> SegmentsInPath(IEnumerable<BezierPathSegment> segments, bool closed = false)
```

### Parameters

**** (\[IEnumerable\<BezierPathSegment>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)): The path segments to iterate from**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to return the segment connecting the last point to the beginning of the path

### Returns

| Type                                                                                                           | Description                                 |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [IEnumerable\<BezierSegment>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | An enumerable of every segments in the path |
