XREALFrameSource Class

Description

MonoBehaviour which controls XREAL camera device ( XREALCameraDevice ) in the scene, providing a few extensions in the Unity environment.

This frame source is one type of motion tracking device, and will output motion data in a ARSession .

EasyAR Sense will stop responding after a fixed and limited time per run if trial product (personal license, trial XR license, or trial Mega services, etc.) is being used with custom camera or HMD.


Properties

enabled

C#

public bool enabled { get; set; }

Start/Stop video stream capture when ARSession is running. Capture will start only when MonoBehaviour .enabled is true after session started.

Opened

C#

public bool Opened { get; }

Whether camera is opened.

FrameRate

C#

public double FrameRate { get; }

Frame rate range. Only usable when XREALFrameSource.Opened is true.

Size

C#

public Vector2Int Size { get; }

Current preview size. Only usable when XREALFrameSource.Opened is true.

ReceivedFrameCount

C#

public int ReceivedFrameCount { get; }

Received frame count. Usually used for debug. There are usually hardware issues if this value stop to increase, and re-plug may help.


Events

DeviceOpened

C#

public event Action<bool, PermissionStatus , string> DeviceOpened

Event when device opened. The bool value indicates if open success.

DeviceClosed

C#

public event Action DeviceClosed

Event when device closed.


Methods

Open

C#

public void Open()

Open device. If neither XREALFrameSource.Open nor XREALFrameSource.Close is called manually, XREALFrameSource.Open will be automatically invoked upon ARSession startup.

Close

C#

public void Close()

Close device.