# CallFloatMethod

> Calls a Java instance method defined by \<tt\>methodID\</tt\>, optionally passing an array of arguments (\<tt\>args\</tt\>) to the method.

## Definition

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

## CallFloatMethod(IntPtr, IntPtr, jvalue\[])

Calls a Java instance method defined by \\\<tt\\>methodID\\\</tt\\>, optionally passing an array of arguments (\\\<tt\\>args\\\</tt\\>) to the method.

```csharp
public static float CallFloatMethod(nint obj, nint methodID, jvalue[] args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java object on which to call the instance method.**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (jvalue\[]): An array of arguments to pass to the method.

### Returns

| Type                                                          | Description                            |
| ------------------------------------------------------------- | -------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value returned by the Java method. |

### Remarks

Additional Resources: [Java Native Interface Specification (Oracle)](http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html)

## CallFloatMethod(IntPtr, IntPtr, Span\<jvalue>)

Calls a Java instance method defined by `methodID`, optionally passing an array of arguments (`args`) to the method.

```csharp
public static float CallFloatMethod(nint obj, nint methodID, Span<jvalue> args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java object on which to call the instance method.**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (\[Span\<jvalue>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): An array of arguments to pass to the method.

### Returns

| Type                                                          | Description                            |
| ------------------------------------------------------------- | -------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value returned by the Java method. |

### Remarks

Additional Resources: [Java Native Interface Specification (Oracle)](http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html)
