Table of Contents

Class MetaXRFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.Ext.MetaXR.dll

Custom frame source that connects Meta XR output to EasyAR input in the scene. Provides Meta XR support through the custom camera feature of EasyAR Sense.

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

To use this frame source, Meta MRUK (Mixed Reality Utility Kit) is required. Configure Meta MRUK according to the official documentation.

public class MetaXRFrameSource : ExternalDeviceMotionFrameSource
Inheritance
MetaXRFrameSource
Inherited Members

Fields

ConfigurePassthroughCamera

Whether to configure Meta.XR.PassthroughCameraAccess at runtime. When enabled, the frame source selects an appropriate camera position and resolution before starting the camera. When disabled, the settings on Meta.XR.PassthroughCameraAccess are preserved.

public bool ConfigurePassthroughCamera

MaxCameraInputFrameRate

Maximum frame rate for inputting camera data to EasyAR. This setting does not change the rendering frame rate or the camera frame rate of Meta.XR.PassthroughCameraAccess.

Due to limitations of the Meta Meta.XR.PassthroughCameraAccess interface, camera data acquisition is affected by camera update timing and GPU readback latency, so the actual input frame rate may be lower than this value.

The EasyAR camera input frame rate has little impact on image tracking with fusion mode enabled, object tracking, and other EasyAR features, but setting this value below 5 is not recommended.

[Min(1)]
public int MaxCameraInputFrameRate

PreferPreciseCameraTimestamp

Whether to prefer the available MRUK precise monotonic camera timestamp.

MRUK does not currently provide this timestamp through a public interface available to EasyAR. When this option is enabled, private fields are accessed through reflection. Partial compatibility checks are performed during build, but not all cases can be covered, and future MRUK version changes may still invalidate this path. If this option is disabled or the precise path is unavailable, it falls back to the public timestamp scheme, and time synchronization accuracy may decrease. Keeping it enabled is recommended; disable it only when troubleshooting compatibility issues.

public bool PreferPreciseCameraTimestamp

Properties

AvailableCenterMode

Provided only when creating a new frame source. It is accessed only during Assemble().

All available center modes.

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

Camera

Provided only when creating a new frame source. It is accessed only during Assemble().

On desktop devices or phones, this camera represents the Camera corresponding to the real-world camera device in the virtual world. Its projection matrix and position correspond to the real camera and are controlled by EasyAR. On headsets, this camera is only used to display diagnostic text in front of the eyes; it is not used for rendering, and the camera is not controlled by EasyAR.

protected override Camera Camera { get; }

CameraFrameStarted

Provided only when creating a new frame source. It is accessed during the entire lifecycle of ARSession.

Whether camera frame input has started.

protected override bool CameraFrameStarted { get; }

CameraRigCandidate

Optional OVRCameraRig used to obtain the rendering camera and tracking origin. When not specified, the frame source automatically searches for it in the scene.

public OVRCameraRig CameraRigCandidate { get; set; }

DeviceCameras

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

Device cameras that provide camera frame data. If camera frame data is provided by multiple cameras, the list must contain all cameras.

Make sure the value is correct when CameraFrameStarted is true.

protected override List<FrameSourceCamera> DeviceCameras { get; }

Display

Provided only when creating a new frame source. It is accessed only during Assemble().

Provides display system information. You can use DefaultSystemDisplay or DefaultHMDDisplay to obtain default display information.

protected override IDisplay Display { get; }

IsAvailable

Provided only when creating a new frame source. It is accessed only during Assemble().

Whether the current frame source is available.

If the value is null, CheckAvailability() will be called, and the value will be obtained after Coroutine ends.

protected override Optional<bool> IsAvailable { get; }

IsHMD

Provided only when creating a new frame source. It is accessed only during Assemble().

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

Some frame filters behave differently when running on devices.

protected override bool IsHMD { get; }

Origin

Device origin. You need to define your own origin when OriginType is Custom; otherwise, no redefinition is required.

protected override GameObject Origin { get; }

OriginType

Device origin type.

protected override ExternalDeviceFrameSource.DeviceOriginType OriginType { get; }

PassthroughCameraAccessCandidate

Optional PassthroughCameraAccess component. When not specified, the frame source automatically searches for it in the scene.

public PassthroughCameraAccess PassthroughCameraAccessCandidate { get; set; }

Methods

OnSessionStart(ARSession)

Provided only when creating a new frame source. It is accessed only during StartSession().

Handles session start if this frame source has been assembled into Assembly. This method is designed for delayed initialization, and you can perform AR-specific initialization work in it.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

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

Handles session stop if this frame source has been assembled into Assembly. You can use this method to destroy resources created by StartSession() and during session runtime, and to 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()