Class VisionOSARKitFrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
AMonoBehaviourthat controls the VisionOS ARKit camera device (easyar.VisionOSARKitCameraDevice) in the scene, providing functional extensions within the Unity environment.
This frame source is a motion tracking device that outputs motion data within theARSession.
When using trial products (Personal license, Trial XR license, or Trial Mega service, etc.) on custom cameras or headsets, EasyAR Sense will stop responding after a fixed, limited time following each startup.
public class VisionOSARKitFrameSource : FrameSource
- Inheritance
-
VisionOSARKitFrameSource
- Inherited Members
Properties
AvailableCenterMode
Provided only when creating a new frame source. It is only accessed during theAssemble()process.
All available center modes.
protected override IReadOnlyList<ARSession.ARCenterMode> AvailableCenterMode { get; }
Camera
Provided only when creating a new frame source. It is only accessed during theAssemble()process.
On desktop devices or phones, this camera represents the virtual world counterpart of the real-world camera device, corresponding toCamera. Its projection matrix and position will 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, not for scene 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 throughout the lifecycle of theARSession.
Whether camera frame input has started.
protected override bool CameraFrameStarted { get; }
DeviceCameras
Provided only when creating a new frame source. It is accessed whenCameraFrameStartedis true.
Provides the device camera(s) supplying the camera frame data. If frame data comes from multiple cameras, the list must include all of them.
Ensure this value is correct whenCameraFrameStartedis true.
protected override List<FrameSourceCamera> DeviceCameras { get; }
Display
Provided only when creating a new frame source. It is only accessed during theAssemble()process.
Provides display system information. You can useDefaultSystemDisplayorDefaultHMDDisplayto get default display information.
protected override IDisplay Display { get; }
FrameRateRange
Frame rate range. Only available whenOpenedis true.
public Vector2 FrameRateRange { get; }
IsAvailable
Provided only when creating a new frame source. It is only accessed during theAssemble()process.
Whether the current frame source is available.
If the value equals null,CheckAvailability()will be called, and the value will be obtained after theCoroutineends.
protected override Optional<bool> IsAvailable { get; }
IsCameraUnderControl
Provided only when creating a new frame source. It is only accessed during theAssemble()process.
When true, the session will update the camera's transform and render the camera image.
When creating headset extensions, this 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; }
IsHMD
Provided only when creating a new frame source. It is only accessed during theAssemble()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 when running on devices.
protected override bool IsHMD { get; }
Opened
Whether the camera is open.
public bool Opened { get; }
Size
Current image size. Only available whenOpenedis true.
public Vector2Int Size { get; }
enabled
Controls when theARSessionstarts/stops capturing the video stream. After session startup, capture only starts whenMonoBehaviour.enabled is true.
public bool enabled { get; set; }
Methods
Close()
Closes the device.
public void Close()
OnSessionStart(ARSession)
Provided only when creating a new frame source. It is only accessed during theStartSession()process.
Handles session startup if this frame source is assembled intoAssembly. This method is designed for deferred initialization; you can perform AR-specific initialization work here.
protected override void OnSessionStart(ARSession session)
Parameters
session
OnSessionStop()
Provided only when creating a new frame source. It is accessed duringStopSession(bool)or other session stop/corruption processes.
Handles session stop if this frame source is assembled intoAssembly. You can use this method to destroy resources created duringStartSession()and session operation, and restore internal state. This method is guaranteed to be called before session destruction. If the frame source is destroyed before the session, this method will not be called, and the session will be corrupted.
protected override void OnSessionStop()
Open()
Opens the device. IfOpen()andClose()are not manually called, theARSessionwill automatically callOpen()upon startup.
public void Open()
Events
DeviceClosed
Device close event.
public event Action DeviceClosed
DeviceOpened
Device open event, the bool value indicates success.
public event Action<bool, PermissionStatus, string> DeviceOpened