# FromByteArray(IntPtr)

> Converts a Java array of \<tt\>byte\</tt\> to a managed array of System.Byte.

## Definition

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

> **Warning:**
>
> **Deprecated.** AndroidJNI.FromByteArray is obsolete. Use AndroidJNI.FromSByteArray method instead

```csharp
public static byte[] FromByteArray(IntPtr array)
```

### Parameters

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

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [byte\[\]](https://learn.microsoft.com/dotnet/api/system.byte) |             |

### Remarks

[AndroidJNI.FromByteArray](/engine/6000.0/script-reference/unityengine/androidjni/frombytearray.md) is obsolete. Use [AndroidJNI.FromSByteArray](/engine/6000.0/script-reference/unityengine/androidjni/fromsbytearray.md) instead.

Additional Resources: [AndroidJNI.GetByteArrayElement](/engine/6000.0/script-reference/unityengine/androidjni/getbytearrayelement.md), [AndroidJNI.GetArrayLength](/engine/6000.0/script-reference/unityengine/androidjni/getarraylength.md).
