Version: 2019.2

AndroidJNI

class in UnityEngine

マニュアルに切り替える

説明

'Raw' JNI interface to Android Java VM from Unity scripting (C#).

Note: Using raw JNI functions requires advanced knowledge of the Android Java Native Interface (JNI). Please take note.

Static 関数

AllocObjectオブジェクト用としてコストラクタを呼び出さずに、新しい Java オブジェクトを割り当てる。
AttachCurrentThreadJava ( Dalvik ) VM を現行のスレッドにアタッチする。
CallBooleanMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallByteMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallCharMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallDoubleMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallFloatMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallIntMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallLongMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallObjectMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallShortMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallStaticBooleanMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticByteMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticCharMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticDoubleMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticFloatMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticIntMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticLongMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticObjectMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticShortMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticStringMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticVoidMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStringMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallVoidMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
DeleteGlobalRefobjで指定したグローバル参照を削除します。
DeleteLocalRefobjで指定したローカル参照ポイントを削除します。
DetachCurrentThreadJava ( Dalvik ) VM から現行のスレッドをデタッチします。
EnsureLocalCapacity指定された数のローカル参照を、現在のスレッドで作成できることを保証します
ExceptionClear現在スローされているすべての例外を削除します
ExceptionDescribelogcatに例外とスタックのバックトレースを表示します
ExceptionOccurred例外がスローされるかどうかを設定する
FatalError致命的なエラーを発生させて VM が回復することを期待しません。この関数は戻り値はありません。
FindClassこの関数はローカルに定義されたクラスを読み込みます。
FromBooleanArrayConverts a Java array of boolean to a managed array of System.Boolean.
FromByteArrayConverts a Java array of byte to a managed array of System.Byte.
FromCharArrayConverts a Java array of char to a managed array of System.Char.
FromDoubleArrayConverts a Java array of double to a managed array of System.Double.
FromFloatArrayConverts a Java array of float to a managed array of System.Single.
FromIntArrayConverts a Java array of int to a managed array of System.Int32.
FromLongArrayConverts a Java array of long to a managed array of System.Int64.
FromObjectArrayConverts a Java array of java.lang.Object to a managed array of System.IntPtr, representing Java objects.
FromReflectedField<tt>java.lang.reflect.Field<tt>オブジェクトをフィールド ID へ変換する。
FromReflectedMethod<tt>java.lang.reflect.Method<tt>や<tt>java.lang.reflect.Constructor<tt>オブジェクトをメソッド ID へ変換する。
FromShortArrayConverts a Java array of short to a managed array of System.Int16.
GetArrayLength配列の長さを取得します。
GetBooleanArrayElementプリミティブ配列の 1 つの要素の値を返します
GetBooleanFieldReturns the value of an instance (nonstatic) field of an object.
GetByteArrayElementプリミティブ配列の 1 つの要素の値を返します
GetByteFieldReturns the value of an instance (nonstatic) field of an object.
GetCharArrayElementプリミティブ配列の 1 つの要素の値を返します
GetCharFieldReturns the value of an instance (nonstatic) field of an object.
GetDoubleArrayElementプリミティブ配列の 1 つの要素の値を返します
GetDoubleFieldReturns the value of an instance (nonstatic) field of an object.
GetFieldIDstatic ではないクラスのインスタンスフィールドのフィールド ID を取得します。
GetFloatArrayElementプリミティブ配列の 1 つの要素の値を返します
GetFloatFieldReturns the value of an instance (nonstatic) field of an object.
GetIntArrayElementプリミティブ配列の 1 つの要素の値を返します
GetIntFieldReturns the value of an instance (nonstatic) field of an object.
GetLongArrayElementプリミティブ配列の 1 つの要素の値を返します
GetLongFieldReturns the value of an instance (nonstatic) field of an object.
GetMethodIDstatic でないクラスやインターフェースのメソッド ID を取得する
GetObjectArrayElementObject配列の要素を返します。
GetObjectClassオブジェクトのクラスを取得します。
GetObjectFieldReturns the value of an instance (nonstatic) field of an object.
GetShortArrayElementプリミティブ配列の 1 つの要素の値を返します
GetShortFieldReturns the value of an instance (nonstatic) field of an object.
GetStaticBooleanFieldReturns the value of a static field of an object.
GetStaticByteFieldReturns the value of a static field of an object.
GetStaticCharFieldReturns the value of a static field of an object.
GetStaticDoubleFieldReturns the value of a static field of an object.
GetStaticFieldIDクラスの static フィールドのフィールド ID を取得します。
GetStaticFloatFieldReturns the value of a static field of an object.
GetStaticIntFieldReturns the value of a static field of an object.
GetStaticLongFieldReturns the value of a static field of an object.
GetStaticMethodIDクラスの static メソッドのメソッド ID を取得します
GetStaticObjectFieldReturns the value of a static field of an object.
GetStaticShortFieldReturns the value of a static field of an object.
GetStaticStringFieldReturns the value of a static field of an object.
GetStringFieldReturns the value of an instance (nonstatic) field of an object.
GetStringUTFCharsUTF-8 エンコーディングに修正された文字列を表す String オブジェクトを返します。
GetStringUTFLength修正された UTF-8 形式の文字列のバイトの長さを返します。
GetSuperclassclazzがObjectクラス以外の物を指す場合、この関数はclazzによって指定されたクラスのスーパークラスを表すオブジェクトを返します。
GetVersionネイティブメソッドインターフェースのバージョンを取得します。
IsAssignableFromclazz1オブジェクトはclazz2へ安全にキャストできるかどうかを決定します
IsInstanceOfオブジェクトがクラスのインスタンスであるかどうかを確認します。
IsSameObject2 つの参照が同じ Java オブジェクトかどうかを確認します。
NewBooleanArrayConstructs a new primitive array object.
NewByteArrayConstructs a new primitive array object.
NewCharArrayConstructs a new primitive array object.
NewDoubleArrayConstructs a new primitive array object.
NewFloatArrayConstructs a new primitive array object.
NewGlobalRefobj引数によって参照されたオブジェクトへの新規グローバル参照を作成します。
NewIntArrayConstructs a new primitive array object.
NewLocalRefobj引数と同じオブジェクトを参照する、新しいローカル参照を作成します。
NewLongArrayConstructs a new primitive array object.
NewObject新規 Java オブジェクトを構築します。メソッド ID はコンストラクターメソッドを実行するためのインデックスです。この ID は<init>のようなメソッド名と void (V)のような戻り型で GetMethodID()を呼び出して取得したものにすべきです。
NewObjectArrayclazzクラスを持つオブジェクト配列を作成します。すべての要素がobjに設定されています
NewShortArrayConstructs a new primitive array object.
NewStringUTF修正された UTF-8 エンコーディングの文字配列から新規java.lang.Stringオブジェクトを構築します。
PopLocalFrameすべてのローカル参照から現在のローカル参照フレームを取り出し、resultオブジェクトを渡すために前のローカル参照フレームを返します。
PushLocalFrame新しいローカル参照フレームを、最低でも設定した数作成する。
SetBooleanArrayElementSets the boolean value of one element in a primitive array.
SetBooleanFieldSets the value of an instance field of the specified object.
SetByteArrayElementSets the sbyte value of one element in a primitive array.
SetByteFieldSets the value of an instance field of the specified object.
SetCharArrayElementSets the char value of one element in a primitive array.
SetCharFieldSets the value of an instance field of the specified object.
SetDoubleArrayElementSets the double value of one element in a primitive array.
SetDoubleFieldSets the value of an instance field of the specified object.
SetFloatArrayElementSets the float value of one element in a primitive array.
SetFloatFieldSets the value of an instance field of the specified object.
SetIntArrayElementSets the int value of one element in a primitive array.
SetIntFieldSets the value of an instance field of the specified object.
SetLongArrayElementSets the long value of one element in a primitive array.
SetLongFieldSets the value of an instance field of the specified object.
SetObjectArrayElementObject配列の要素を設定します。
SetObjectFieldSets the value of an instance field of the specified object.
SetShortArrayElementSets the short value of one element in a primitive array.
SetShortFieldSets the value of an instance field of the specified object.
SetStaticBooleanFieldSets the value of a static field in the specified object.
SetStaticByteFieldSets the value of a static field in the specified object.
SetStaticCharFieldSets the value of a static field in the specified object.
SetStaticDoubleFieldSets the value of a static field in the specified object.
SetStaticFloatFieldSets the value of a static field in the specified object.
SetStaticIntFieldSets the value of a static field in the specified object.
SetStaticLongFieldSets the value of a static field in the specified object.
SetStaticObjectFieldSets the value of a static field in the specified object.
SetStaticShortFieldSets the value of a static field in the specified object.
SetStaticStringFieldSets the value of a static field in the specified object.
SetStringFieldSets the value of an instance field of the specified object.
Throwjava.lang.Throwableオブジェクトがスローされます。
ThrowNew例外オブジェクトがmessageで指定されたクラスから構築され、その例外がスローされます。
ToBooleanArrayConverts a managed array of System.Boolean to a Java array of boolean.
ToByteArrayConverts a managed array of System.Byte to a Java array of byte.
ToCharArrayConverts a managed array of System.Char to a Java array of char.
ToDoubleArrayConverts a managed array of System.Double to a Java array of double.
ToFloatArrayConverts a managed array of System.Single to a Java array of float.
ToIntArrayConverts a managed array of System.Int32 to a Java array of int.
ToLongArrayConverts a managed array of System.Int64 to a Java array of long.
ToObjectArrayConverts a managed array of System.IntPtr, representing Java objects, to a Java array of java.lang.Object.
ToReflectedFieldクラスから派生されたフィールド ID をjava.lang.reflect.Fieldオブジェクトへと変換します。
ToReflectedMethodclazz から派生したメソッド ID からjava.lang.reflect.Methodやjava.lang.reflect.Constructorオブジェクトへ変換します。
ToShortArrayConverts a managed array of System.Int16 to a Java array of short.