AREngineFrameSource Class¶
Description¶
A custom frame source which connects AREngine camera device output to EasyAR input in the scene, providing AR Engine support using custom camera feature of EasyAR Sense.
This frame source is one type of motion tracking device, and will output motion data in a ARSession .
Huawei AR Engine Unity SDK is NOT required to use this frame source.
Fields¶
DesiredFocusMode¶
- C#
public AREngineCameraDeviceFocusMode DesiredFocusMode
Desired focus mode. Only effective if modified before the AREngineFrameSource.DeviceOpened event or OnEnable.
Note: focus switch may not work on some devices due to hardware or system limitation.
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.
FrameRateRange¶
- C#
public Vector2 FrameRateRange { get; }
Frame rate range. Only usable when AREngineFrameSource.Opened is true.
Size¶
- C#
public Optional< Vector2Int > Size { get; }
Current preview size. Only usable when AREngineFrameSource.Opened is true.
CameraCandidate¶
- C#
public Camera CameraCandidate { get; set; }
AREngineFrameSource.Camera candidate. Only effective if Unity XR Origin is not used. Camera.main will be used if not specified.
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 AREngineFrameSource.Open nor AREngineFrameSource.Close is called manually, AREngineFrameSource.Open will be automatically invoked upon ARSession startup.
Close¶
- C#
public void Close()
Close device.