# GetSegments(int)

> Get/Set an array of segments of SpriteShapeRenderer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.U2D](/engine/6000.5/script-reference/unityengine/u2d.md)
* **Assembly:** UnityEngine.SpriteShapeModule

```csharp
public NativeArray<SpriteShapeSegment> GetSegments(int dataSize)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Size to be reserved for the segments array.

### Returns

| Type                                                                                                  | Description                              |
| ----------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| [NativeArray\<SpriteShapeSegment>](/engine/6000.5/script-reference/unity/collections/nativearray1.md) | Size to be reserved for the NativeArray. |
