文档

Unity Engine

Unity Engine

NewObject

Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with \<init\> as the method name and void (V) as the return type.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

NewObject(IntPtr, IntPtr, jvalue[])

Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with \<init\> as the method name and void (V) as the return type.
public static IntPtr NewObject(IntPtr clazz, IntPtr methodID, jvalue[] args)

Parameters

clazz


methodID


args

jvalue[]

Returns

Type

Description

IntPtr

Remarks

NewObject(IntPtr, IntPtr, Span<jvalue>)

Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with \<init\> as the method name and void (V) as the return type.
public static IntPtr NewObject(IntPtr clazz, IntPtr methodID, Span<jvalue> args)

Parameters

clazz


methodID


Returns

Type

Description

IntPtr

Remarks