Version: 2022.3
言語: 日本語

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.
CallBooleanMethodUnsafeCalls 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.
CallCharMethodUnsafeCalls 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.
CallDoubleMethodUnsafeCalls 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.
CallFloatMethodUnsafeCalls 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.
CallIntMethodUnsafeCalls 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.
CallLongMethodUnsafeCalls 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.
CallObjectMethodUnsafeCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallSByteMethodCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
CallSByteMethodUnsafeCalls 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.
CallShortMethodUnsafeCalls 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).
CallStaticBooleanMethodUnsafeInvokes 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).
CallStaticCharMethodUnsafeInvokes 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).
CallStaticDoubleMethodUnsafeInvokes 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).
CallStaticFloatMethodUnsafeInvokes 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).
CallStaticIntMethodUnsafeInvokes 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).
CallStaticLongMethodUnsafeInvokes 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).
CallStaticObjectMethodUnsafeInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticSByteMethodInvokes the specified methodID static method on a Java object, optionally passing in an array of arguments (args).
CallStaticSByteMethodUnsafeInvokes 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).
CallStaticShortMethodUnsafeInvokes 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).
CallStaticStringMethodUnsafeInvokes 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).
CallStaticVoidMethodUnsafeInvokes 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.
CallStringMethodUnsafeCalls 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.
CallVoidMethodUnsafeCalls a Java instance method defined by methodID, optionally passing an array of arguments (args) to the method.
DeleteGlobalRefobjで指定したグローバル参照を削除します。
DeleteLocalRefobjで指定したローカル参照ポイントを削除します。
DeleteWeakGlobalRefDeletes the global weak reference pointed to by obj.
DetachCurrentThreadJava ( Dalvik ) VM から現行のスレッドをデタッチします。
EnsureLocalCapacity指定された数のローカル参照を、現在のスレッドで作成できることを保証します
ExceptionClear現在スローされているすべての例外を削除します
ExceptionDescribelogcatに例外とスタックのバックトレースを表示します
ExceptionOccurred例外がスローされるかどうかを設定する
FatalError致命的なエラーを発生させて VM が回復することを期待しません。この関数は戻り値はありません。
FindClassこの関数はローカルに定義されたクラスを読み込みます。
FromBooleanArrayConverts a Java array of boolean to a managed array of System.Boolean.
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 へ変換する。
FromSByteArrayConverts a Java array of byte to a managed array of System.SByte.
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.
GetCharArrayElementプリミティブ配列の 1 つの要素の値を返します
GetCharFieldReturns the value of an instance (nonstatic) field of an object.
GetDirectBufferAddressFetches and returns the starting address of the memory region referenced by the given direct java.nio.Buffer.
GetDirectBufferCapacityFetches and returns the capacity of the memory region referenced by the given direct java.nio.Buffer.
GetDirectByteBufferReturns the NativeArray backed by the same memory region as the given direct java.nio.Buffer.
GetDirectSByteBufferReturns the NativeArray backed by the same memory region as the given direct java.nio.Buffer.
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.
GetJavaVMReturns the pointer to JavaVM.
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.
GetSByteArrayElementプリミティブ配列の 1 つの要素の値を返します
GetSByteFieldReturns 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.
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.
GetStaticSByteFieldReturns 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.
GetStringCharsReturns a pointer to the array of Unicode characters of the string. This pointer is valid until ReleaseStringchars() is called.
GetStringFieldReturns the value of an instance (nonstatic) field of an object.
GetStringLengthReturns the length (the count of Unicode characters) of a Java string.
GetStringUTFCharsUTF-8 エンコーディングに修正された文字列を表す String オブジェクトを返します。
GetStringUTFLength修正された UTF-8 形式の文字列のバイトの長さを返します。
GetSuperclassclazzがObjectクラス以外の物を指す場合、この関数はclazzによって指定されたクラスのスーパークラスを表すオブジェクトを返します。
GetVersionネイティブメソッドインターフェースのバージョンを取得します。
IsAssignableFromclazz1オブジェクトはclazz2へ安全にキャストできるかどうかを決定します
IsInstanceOfオブジェクトがクラスのインスタンスであるかどうかを確認します。
IsSameObject2 つの参照が同じ Java オブジェクトかどうかを確認します。
NewBooleanArrayConstructs a new primitive array object.
NewCharArrayConstructs a new primitive array object.
NewDirectByteBufferAllocates and returns a direct java.nio.ByteBuffer referring to the block of memory starting at the memory address address and extending capacity bytes.
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()を呼び出して取得したものにすべきです。
NewObjectA新規 Java オブジェクトを構築します。メソッド ID はコンストラクターメソッドを実行するためのインデックスです。この ID は<init>のようなメソッド名と void (V)のような戻り型で GetMethodID()を呼び出して取得したものにすべきです。
NewObjectArrayclazzクラスを持つオブジェクト配列を作成します。すべての要素がobjに設定されています
NewSByteArrayConstructs a new primitive array object.
NewShortArrayConstructs a new primitive array object.
NewStringConstructs a new java.lang.String object from an array of Unicode characters.
NewStringUTF修正された UTF-8 エンコーディングの文字配列から新規java.lang.Stringオブジェクトを構築します。
NewWeakGlobalRefCreates a new global weak reference to the object referred to by the obj argument.
PopLocalFrameすべてのローカル参照から現在のローカル参照フレームを取り出し、resultオブジェクトを渡すために前のローカル参照フレームを返します。
PushLocalFrame新しいローカル参照フレームを、最低でも設定した数作成する。
RegisterNativesRegisters native methods with the class specified by the clazz argument.
SetBooleanArrayElementSets the boolean value of one element in a primitive array.
SetBooleanFieldSets 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.
SetSByteArrayElementSets the sbyte value of one element in a primitive array.
SetSByteFieldSets 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.
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.
SetStaticSByteFieldSets 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.
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オブジェクトへ変換します。
ToSByteArrayConverts a managed array of System.SByte to a Java array of byte.
ToShortArrayConverts a managed array of System.Int16 to a Java array of short.
UnregisterNativesUnregisters native methods of a class. The class goes back to the state before it was linked or registered with its native method functions.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961