# ToIntArray

> Converts a managed array of System.Int32 to a Java array of \<tt\>int\</tt\>.

## Definition

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

## ToIntArray(int\[])

Converts a managed array of System.Int32 to a Java array of \\\<tt\\>int\\\</tt\\>.

```csharp
public static nint ToIntArray(int[] array)
```

### Parameters

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

### Returns

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

### Remarks

Additional Resources: [AndroidJNI.NewIntArray](/engine/6000.5/script-reference/unityengine/androidjni/newintarray.md), [AndroidJNI.SetIntArrayElement](/engine/6000.5/script-reference/unityengine/androidjni/setintarrayelement.md).

## ToIntArray(int\*, int)

Converts a managed array of System.Int32 to a Java array of \\\<tt\\>int\\\</tt\\>.

```csharp
public static nint ToIntArray(int* array, int length)
```

### Parameters

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

### Returns

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

### Remarks

Additional Resources: [AndroidJNI.NewIntArray](/engine/6000.5/script-reference/unityengine/androidjni/newintarray.md), [AndroidJNI.SetIntArrayElement](/engine/6000.5/script-reference/unityengine/androidjni/setintarrayelement.md).
