Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Call

Calls a Java method on an object (non-static).
Read time 2 minutesLast updated 4 days ago

Definition

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

Call<T>(string, `<>[])

Calls a Java method on an object (non-static).
public void Call<T>(string methodName, T[] args)

Parameters

methodName

Specifies which method to call.

args

An array of parameters passed to the method.

Remarks

To call a method with return type 'void', use the regular version.

Call<T>(IntPtr, `<>[])

Calls a Java method on an object (non-static).
public void Call<T>(nint methodID, T[] args)

Parameters

methodID

The ID of the method to call.

args

An array of parameters passed to the method.

Remarks

To call a method with return type 'void', use the regular version.

Call(string, Object[])

Calls a Java method on an object (non-static).
public void Call(string methodName, params object[] args)

Parameters

methodName

Specifies which method to call.

An array of parameters passed to the method.

Remarks

To call a method with return type 'void', use the regular version.

Call(IntPtr, Object[])

Calls a Java method on an object (non-static).
public void Call(nint methodID, params object[] args)

Parameters

methodID

The ID of the method to call.

An array of parameters passed to the method.

Remarks

To call a method with return type 'void', use the regular version.

Call<T, U>(string, `<T>[])

Call a Java method on an object.
public ReturnType Call<ReturnType, T>(string methodName, T[] args)

Parameters

methodName

Specifies which method to call.

args

An array of parameters passed to the method.

Returns

Type

Description

TThe value returned by the Java method call.

Remarks

To call a Java method with a non-void return type, use the generic version.

Call<T, U>(IntPtr, `<T>[])

Calls a Java method on an object (non-static).
public ReturnType Call<ReturnType, T>(nint methodID, T[] args)

Parameters

methodID

The ID of the method to call.

args

An array of parameters passed to the method.

Returns

Type

Description

TThe value returned by the Java method call.

Remarks

To call a Java method with a non-void return type, use the generic version.

Call<T>(string, Object[])

Call a Java method on an object.
public ReturnType Call<ReturnType>(string methodName, params object[] args)

Parameters

methodName

Specifies which method to call.

An array of parameters passed to the method.

Returns

Type

Description

TThe value returned by the Java method call.

Remarks

To call a Java method with a non-void return type, use the generic version.

Call<T>(IntPtr, Object[])

Calls a Java method on an object (non-static).
public ReturnType Call<ReturnType>(nint methodID, params object[] args)

Parameters

methodID

The ID of the method to call.

An array of parameters passed to the method.

Returns

Type

Description

TThe value returned by the Java method call.

Remarks

To call a Java method with a non-void return type, use the generic version.