Class EasyARSettings.UnityXROptions
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Configuration items related to the Unity XR Framework.
[Serializable]
public class EasyARSettings.UnityXROptions
- Inheritance
-
EasyARSettings.UnityXROptions
Fields
ARFoundationSupport
EasyAR AR Foundation support. It is recommended to keep this enabled; otherwise, EasyAR may not function properly when using ARFoundation. Only disable it if future AR Foundation updates cause incompatibility and EasyAR has not yet released an update.
[Tooltip("EasyAR AR Foundation Support. It is recommended to keep this enabled; otherwise, EasyAR may not work properly with AR Foundation. Disable only if a future AR Foundation update causes incompatibility and EasyAR has not yet provided an update.")]
public bool ARFoundationSupport
Field Value
UnityXRAutoSwitch
Automatically switch Unity XR objects (e.g., AR Foundation). This option is primarily designed for mobile AR; on headsets, the functionality is disabled by default.
If you need to control the switching of these components yourself, or if EasyAR's behavior interferes with the normal operation of certain components, ensure these options are disabled.
To enable automatic switching of AR Foundation at runtime, you need to create AR Foundation's `ARSession` and `XR Origin` in the scene via Unity's right-click menu and use AR Foundation's camera.
At runtime, ARSession will disable all Unity XR Core components and AR Foundation components upon Awake.
At runtime, if the selected frame-source inherits from ARFoundationFrameSource or implements an XROrigin-based ExternalDeviceFrameSource, the disabled Unity XR Core and AR Foundation components will be enabled during StartSession() (components not disabled by EasyAR will not be enabled). If any other frame-source is selected, all Unity XR Core and AR Foundation components will be disabled during StartSession().
At runtime, all Unity XR Core and AR Foundation components will be disabled during StopSession(bool).
Note: XR Interaction Toolkit components are not controlled by this option, but their compatibility with EasyAR is unverified. Theoretically, features using only the XROrigin GameObject and its Camera should work, but you may need to set CenterMode to SessionOrigin. If functionality is abnormal, you must manage XR Interaction Toolkit components yourself, disabling them when the frame-source does not inherit from ARFoundationFrameSource.
[Tooltip("Auto switch Unity XR (like AR Foundation) objects. This option is primarily designed for mobile AR. On head-mounted devices, the feature will be disabled by default. If you need to manually control the switching of these components, or if EasyAR's behavior interferes with the normal operation of certain components, make sure to disable these options. Please read API documents for more details.")]
public EasyARSettings.UnityXROptions.AutoSwitchOptions UnityXRAutoSwitch