# ToDoubleArray

> Converts a managed array of System.Double to a Java array of \<tt\>double\</tt\>.

## Definition

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

## ToDoubleArray(double\[])

Converts a managed array of System.Double to a Java array of \\\<tt\\>double\\\</tt\\>.

```csharp
public static nint ToDoubleArray(double[] array)
```

### Parameters

**** (\[double\[]]\(https\://learn.microsoft.com/dotnet/api/system.double)): The managed array to convert.

### Returns

| Type                                                           | Description                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) | A local reference to the newly constructed Java array of double. |

### Remarks

Additional Resources: [AndroidJNI.NewDoubleArray](/engine/7000.0/script-reference/unityengine/androidjni/newdoublearray.md), [AndroidJNI.SetDoubleArrayElement](/engine/7000.0/script-reference/unityengine/androidjni/setdoublearrayelement.md)

## ToDoubleArray(double\*, int)

Converts a managed array of System.Double to a Java array of `double`.

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

### Parameters

**** (\[double\*]\(https\://learn.microsoft.com/dotnet/api/system.double)): The managed array to convert.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the array.

### Returns

| Type                                                           | Description                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) | A local reference to the newly constructed Java array of double. |

### Remarks

Additional Resources: [AndroidJNI.NewDoubleArray](/engine/7000.0/script-reference/unityengine/androidjni/newdoublearray.md), [AndroidJNI.SetDoubleArrayElement](/engine/7000.0/script-reference/unityengine/androidjni/setdoublearrayelement.md)
