Table of Contents

Class VisionOSARKitFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.dll

In the scene, control the VisionOS ARKit camera device (easyar.VisionOSARKitCameraDevice) of MonoBehaviour, providing function expansion in the Unity environment.

This frame source is a motion tracking device that outputs motion data in ARSession.

When using trial products (personal license, trial XR license, or trial Mega service, etc.) on custom cameras or headsets, EasyAR Sense will stop responding within a fixed limited time each time it starts up.

public class VisionOSARKitFrameSource : FrameSource
Inheritance
VisionOSARKitFrameSource
Inherited Members

Properties

AvailableCenterMode

Provided only when a new frame source is created. It is only accessed during the Assemble() process.

All available center modes.

protected override IReadOnlyList<ARSession.ARCenterMode> AvailableCenterMode { get; }

Property Value

Camera

Provided only when a new frame source is created. It is only accessed during the Assemble() process.

On desktop devices or mobile phones, this camera represents the Camera corresponding to the camera device in the real environment in the virtual world. Its projection matrix and position will correspond to the real camera and be controlled by EasyAR. On a headset, this camera is only used to display some diagnostic text in front of the eyes, not for screen rendering, and the camera is not controlled by EasyAR.

protected override Camera Camera { get; }

Property Value

CameraFrameStarted

Provided only when a new frame source is created. It is accessed throughout the lifecycle of ARSession.

Whether the camera frame starts to input.

protected override bool CameraFrameStarted { get; }

Property Value

DeviceCameras

Provided only when a new frame source is created. It is accessed when CameraFrameStarted is true.

The device camera that provides camera frame data. If camera frame data is provided by multiple cameras, all cameras need to be included in the list.

Ensure the value is correct when CameraFrameStarted is true.

protected override List<FrameSourceCamera> DeviceCameras { get; }

Property Value

Display

Provided only when a new frame source is created. It is only accessed during the Assemble() process.

protected override IDisplay Display { get; }

Property Value

FrameRateRange

Frame rate range. Only available when Opened is true.

public Vector2 FrameRateRange { get; }

Property Value

IsAvailable

Provided only when a new frame source is created. It is only accessed during the Assemble() process.

protected override Optional<bool> IsAvailable { get; }

Property Value

IsCameraUnderControl

Provided only when a new frame source is created. It is only accessed during the Assemble() process.

When the value is true, the session will update the camera's transform and render the camera image.

When creating a headset extension, it should be false. You should fully control the 3D camera in the scene. You should handle camera rendering, especially in VST mode.

protected override bool IsCameraUnderControl { get; }

Property Value

IsHMD

Provided only when a new frame source is created. It is only accessed during the Assemble() process.

Whether the current frame source is a headset. If it is a headset, diagnostic information will be displayed on a 3D board in front of the camera.

Some frame filters behave differently on the device.

protected override bool IsHMD { get; }

Property Value

Opened

Whether the camera is open.

public bool Opened { get; }

Property Value

Size

Current image size. Only available when Opened is true.

public Vector2Int Size { get; }

Property Value

Methods

Close()

Close the device.

public void Close()

OnSessionStart(ARSession)

Provided only when a new frame source is created. It is only accessed during the StartSession() process.

Handle session startup if this frame source has been assembled into Assembly. This method is designed for lazy initialization, and you can do AR-specific initialization work in this method.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

Provided only when a new frame source is created. It is accessed during StopSession(bool) or other session stop/damage processes.

Handle session stop if this frame source has been assembled into Assembly. You can use this method to destroy StartSession() and resources created during session operation and restore internal state. This method is guaranteed to be called before the session is destroyed. If the frame source is destroyed before the session, it will not be called and the session will be damaged.

protected override void OnSessionStop()

Open()

Open the device. If Open() and Close() are not manually called, ARSession will automatically Open() after startup.

public void Open()

Events

DeviceClosed

Event for device closing.

public event Action DeviceClosed

Event Type

DeviceOpened

Event for device opening, with a bool value indicating whether it is successful.

public event Action<bool, PermissionStatus, string> DeviceOpened

Event Type