AndroidJNI

AndroidJNI.NewObject 新建对象

static function NewObject (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : IntPtr

Description描述

Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with as the method name and void (V) as the return type.

构造新的 Java 对象。方法 ID指示应调用的构造函数方法。该 ID 必须通过调用 GetMethodID() 获得,且调用时的方法名必须为 <init>,而返回类型必须为 void (V)。

clazz 参数务必不要引用数组类。

参见: Java Native Interface Specification (Oracle)

最后修改:2011年4月15日 Friday 12:40

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。