JniUtility Class

This type is an EasyAR Sense API in C#: JniUtility . Some descriptions may not apply to Unity environment on this page.

Some parts of the Sense API may have already been wrapped into Unity components, and directly usages may not be necessary.

Description

JNI utility class.

It is used in Unity to wrap Java byte array and ByteBuffer.

It is not supported on iOS.


Methods

wrapByteArray

C#

public static Buffer wrapByteArray(IntPtr bytes, bool readOnly, Action deleter)

Wraps Java’s byte[]。

wrapBuffer

C#

public static Buffer wrapBuffer(IntPtr directBuffer, Action deleter)

Wraps Java’s java.nio.ByteBuffer, which must be a direct buffer.

getDirectBufferAddress

C#

public static IntPtr getDirectBufferAddress(IntPtr directBuffer)

Get the raw address of a direct buffer of java.nio.ByteBuffer by calling JNIEnv->GetDirectBufferAddress.