ARKitCameraDevice Class

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

This type is partially wrapped into Unity components: ARKitFrameSource . Members and instances of this type are not required to be used directly in most situations. Use this type by ARKitFrameSource.Device instead of creating new instances when a few unwrapped API is desired for use.

Description

ARKitCameraDevice implements a camera device based on ARKit, which outputs InputFrame (including image, camera parameters, timestamp, 6DOF location, and tracking status).

After creation, start/stop can be invoked to start or stop data collection.

When the component is not needed anymore, call close function to close it. It shall not be used after calling close.

ARKitCameraDevice outputs InputFrame from inputFrameSource. inputFrameSource shall be connected to InputFrameSink for use. Refer to Overview .

bufferCapacity is the capacity of InputFrame buffer. If the count of InputFrame which has been output from the device and have not been released is more than this number, the device will not output new InputFrame , until previous InputFrame have been released. This may cause screen stuck. Refer to Overview .


Methods

isAvailable

C#

public static bool isAvailable()

Checks if the component is available. It returns true only on iOS 11 or later when ARKit is supported by hardware.

bufferCapacity

C#

public virtual int bufferCapacity()

InputFrame buffer capacity. The default is 8.

setBufferCapacity

C#

public virtual void setBufferCapacity(int capacity)

Sets InputFrame buffer capacity.

inputFrameSource

C#

public virtual InputFrameSource inputFrameSource()

InputFrame output port.

inputFrameSourceType

C#

public virtual InputFrameSourceType inputFrameSourceType()

Source type of input frames.

setFocusMode

C#

public virtual void setFocusMode( ARKitCameraDeviceFocusMode focusMode)

Sets focus mode to focusMode. Call before start. Valid since iOS 11.3.

start

C#

public virtual bool start()

Starts video stream capture.

stop

C#

public virtual void stop()

Stops video stream capture.

close

C#

public virtual void close()

Close. The component shall not be used after calling close.