CallStaticObjectMethod
Invokes the specified \<tt\>methodID\</tt\> static method on a Java object, optionally passing in an array of arguments (\<tt\>args\</tt\>).
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.AndroidJNIModule
CallStaticObjectMethod(IntPtr, IntPtr, jvalue[])
Invokes the specified \<tt\>methodID\</tt\> static method on a Java object, optionally passing in an array of arguments (\<tt\>args\</tt\>).
public static nint CallStaticObjectMethod(nint clazz, nint methodID, jvalue[] args)
Parameters
Returns
Type | Description |
|---|---|
| IntPtr | A local reference to the Java object returned by the method. |
Remarks
This method returns a reference to a \<tt\>java.lang.Object\</tt\>, or a subclass thereof.
Additional Resources: Java Native Interface Specification (Oracle)
CallStaticObjectMethod(IntPtr, IntPtr, Span<jvalue>)
Invokes the specified static method on a Java object, optionally passing in an array of arguments ().
methodIDargspublic static nint CallStaticObjectMethod(nint clazz, nint methodID, Span<jvalue> args)
Parameters
The Java class on which to call the static method.
The ID of the method to call.
An array of arguments to pass to the method.
Returns
Type | Description |
|---|---|
| IntPtr | A local reference to the Java object returned by the method. |
Remarks
This method returns a reference to a , or a subclass thereof.
java.lang.ObjectAdditional Resources: Java Native Interface Specification (Oracle)