Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CallStatic

Call a static Java method on a class.
Read time 2 minutesLast updated 5 days ago

Definition

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

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

Call a static Java method on a class.
public void CallStatic<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 static method with return type 'void', use the regular version.

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

Call a static Java method on a class.
public void CallStatic<T>(IntPtr 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 static method with return type 'void', use the regular version.

CallStatic(string, Object[])

Call a static Java method on a class.
public void CallStatic(string methodName, params object[] args)

Parameters

methodName

Specifies which method to call.

An array of parameters passed to the method.

Remarks

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

CallStatic(IntPtr, Object[])

Call a static Java method on a class.
public void CallStatic(IntPtr 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 static method with return type 'void', use the regular version.

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

Call a static Java method on a class.
public ReturnType CallStatic<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

T

Remarks

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

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

Call a static Java method on a class.
public ReturnType CallStatic<ReturnType, T>(IntPtr methodID, T[] args)

Parameters

methodID

The ID of the method to call.

args

An array of parameters passed to the method.

Returns

Type

Description

T

Remarks

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

CallStatic<T>(string, Object[])

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

Parameters

methodName

Specifies which method to call.

An array of parameters passed to the method.

Returns

Type

Description

T

Remarks

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

CallStatic<T>(IntPtr, Object[])

Call a static Java method on a class.
public ReturnType CallStatic<ReturnType>(IntPtr methodID, params object[] args)

Parameters

methodID

The ID of the method to call.

An array of parameters passed to the method.

Returns

Type

Description

T

Remarks

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