Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CallObjectMethod

Calls a Java instance method defined by \<tt\>methodID\</tt\>, optionally passing an array of arguments (\<tt\>args\</tt\>) to the method.
Read time 1 minuteLast updated 12 hours ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AndroidJNIModule

CallObjectMethod(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.
public static nint CallObjectMethod(nint obj, nint methodID, jvalue[] args)

Parameters


methodID


args

jvalue[]

Returns

Type

Description

IntPtr

Remarks

This method returns a reference to a \<tt\>java.lang.Object\</tt\>, or a subclass thereof.

CallObjectMethod(IntPtr, IntPtr, Span<jvalue>)

Calls a Java instance method defined by \<tt\>methodID\</tt\>, optionally passing an array of arguments (\<tt\>args\</tt\>) to the method.
public static nint CallObjectMethod(nint obj, nint methodID, Span<jvalue> args)

Parameters

Returns

Type

Description

IntPtr

Remarks

This method returns a reference to a \<tt\>java.lang.Object\</tt\>, or a subclass thereof.