# AsNativeArray()

> Convert internal data buffer to NativeArray for use in entities APIs.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public NativeArray<byte> AsNativeArray()
```

### Returns

| Type                                                                                    | Description                                    |
| --------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [NativeArray\<byte>](/engine/6000.7/script-reference/unity/collections/nativearray1.md) | NativeArray representation of internal buffer. |
