# Resize(int, NativeArrayOptions)

> Sets the length of this buffer, increasing the capacity if necessary.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public void Resize(int length, NativeArrayOptions options)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The new length of this buffer.**** (\[NativeArrayOptions]\(/engine/7000.0/script-reference/unity/collections/nativearrayoptions)): Whether to clear any newly allocated bytes to all zeroes.

### Remarks

If `length` is less than the current length of the buffer, the length of the buffer is reduced while the capacity remains unchanged.
