# GetDirectByteBuffer(nint)

> Returns the NativeArray backed by the same memory region as the given direct java.nio.Buffer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AndroidJNIModule

## GetDirectByteBuffer(IntPtr)

```csharp
public static NativeArray<byte> GetDirectByteBuffer(nint buffer)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)):&#x20;

### Returns

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

### Remarks

Additional Resources: [AndroidJNI.GetDirectBufferAddress](/engine/6000.7/script-reference/unityengine/androidjni/getdirectbufferaddress.md)
