# CreateJNIArgArray

> Creates the parameter array to be used as argument list when invoking Java code through CallMethod() in AndroidJNI.

## Definition

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

## CreateJNIArgArray(Object\[])

Creates the parameter array to be used as argument list when invoking Java code through CallMethod() in AndroidJNI.

```csharp
public static jvalue[] CreateJNIArgArray(object[] args)
```

### Parameters

**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): An array of objects that should be converted to Call parameters.

### Returns

| Type      | Description |
| --------- | ----------- |
| jvalue\[] |             |

## CreateJNIArgArray(Object\[], Span\<jvalue>)

Creates the parameter array to be used as argument list when invoking Java code through CallMethod() in AndroidJNI.

```csharp
public static void CreateJNIArgArray(object[] args, Span<jvalue> jniArgs)
```

### Parameters

**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): An array of objects that should be converted to Call parameters.**** (\[Span\<jvalue>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)):&#x20;
