Class EasyARSettings.UnityXROptions
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Configuration options related to 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 work properly when ARFoundation is used. Disabling it is recommended only if a future AR Foundation update introduces incompatibilities 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
UnityXRAutoSwitch
Automatically switches Unity XR objects, such as AR Foundation objects. This option is designed mainly for mobile AR, and the feature is disabled by default on headsets.
If you need to control switching of these components yourself, or if EasyAR behavior interferes with the normal operation of certain components, make sure these options are disabled.
If you need to switch AR Foundation automatically at runtime, you need to create an AR Foundation `ARSession` and `XR Origin` in the scene through Unity's context menu and use the AR Foundation camera.
At runtime, ARSession disables all Unity XR Core components and AR Foundation components in awake.
At runtime, if the selected frame source inherits from ARFoundationFrameSource or is an ExternalDeviceFrameSource that implements an XROrigin origin, the disabled Unity XR Core components and AR Foundation components will be enabled during StartSession() (components not disabled by EasyAR will not be enabled). If another frame source is selected, all Unity XR Core components and AR Foundation components will be disabled during StartSession().
At runtime, all Unity XR Core components and AR Foundation components are disabled during StopSession(bool).
Note that XR Interaction Toolkit components are not controlled by this option, and their availability in EasyAR has not been verified. In theory, features that only use the XROrigin GameObject and its Camera should work normally, but you may need to set CenterMode to SessionOrigin. If the feature does not work properly, you need to manage XR Interaction Toolkit components yourself and disable the related components 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