Class VisionOSARKitFrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
AMonoBehaviour that 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, outputting motion data within the ARSession.
When using trial products (Personal license, trial XR license, or trial Mega service, etc.) on custom cameras or head-mounted displays, EasyAR Sense will cease responding after a fixed, limited time upon 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 the Assemble() process.
All available center modes.
protected override IReadOnlyList<ARSession.ARCenterMode> AvailableCenterMode { get; }
Property Value
Camera
Provided only when creating a new frame-source. It is only accessed during the Assemble() process.
On desktop devices or mobile phones, this camera represents the Camera in the virtual world corresponding to the real-world camera device. Its projection matrix and position will correspond to the real camera and be controlled by EasyAR. On head-mounted displays, this camera is only used to display diagnostic text in front of the eyes, not for rendering the scene, and the camera is not controlled by EasyAR.
protected override Camera Camera { get; }
Property Value
CameraFrameStarted
Provided only when creating a new frame-source. It is accessed throughout the lifetime of the ARSession.
Indicates if camera frame input has started.
protected override bool CameraFrameStarted { get; }
Property Value
DeviceCameras
Provided only when creating a new frame-source. It is accessed when CameraFrameStarted is true.
Provides the device camera supplying the camera frame data. If camera frame data is provided by multiple cameras, the list should include all of them.
Ensure the value is correct when CameraFrameStarted is true.
protected override List<FrameSourceCamera> DeviceCameras { get; }
Property Value
Display
Provided only when creating a new frame-source. It is only accessed during the Assemble() process.
Provides system display information. You can use DefaultSystemDisplay or DefaultHMDDisplay to obtain the default display information.
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 creating a new frame-source. It is only accessed during the Assemble() process.
Indicates if the current frame-source is available.
If the value equals null, CheckAvailability() will be called, and the value will be obtained after the Coroutine finishes.
protected override Optional<bool> IsAvailable { get; }
Property Value
IsCameraUnderControl
Provided only when creating a new frame-source. It is only accessed during the Assemble() process.
When true, the session will update the camera's transform and render the camera image.
When creating head-mounted display extensions, it should be false. You should have full control over the 3D camera in the scene. You should handle camera rendering, especially in video-see-through mode.
protected override bool IsCameraUnderControl { get; }
Property Value
IsHMD
Provided only when creating a new frame-source. It is only accessed during the Assemble() process.
Indicates if the current frame-source is for a head-mounted display. If it is a head-mounted display, diagnostic information will be displayed on a 3D panel in front of the camera.
Some frame-filters behave differently when running on such devices.
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()
Closes the device.
public void Close()
OnSessionStart(ARSession)
Provided only when creating a new frame-source. It is only accessed during the StartSession() process.
Handles session startup if this frame-source has been assembled into the Assembly. This method is designed for lazy 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 during StopSession(bool) or other session stop/corruption processes.
Handles session stop if this frame-source has been assembled into the Assembly. You can use this method to destroy resources created during StartSession() and while the session was running, 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 corrupted.
protected override void OnSessionStop()
Open()
Opens the device. If Open() and Close() are not manually called, the ARSession will automatically call Open() upon startup.
public void Open()
Events
DeviceClosed
Event when the device closes.
public event Action DeviceClosed
Event Type
DeviceOpened
Event when the device opens, the bool value indicates success.
public event Action<bool, PermissionStatus, string> DeviceOpened