Table of Contents

Class EasyARSettings.UnityXROptions

Namespace
easyar
Assembly
EasyAR.Sense.dll

Configuration items related to Unity XR Framework.

[Serializable]
public class EasyARSettings.UnityXROptions
Inheritance
EasyARSettings.UnityXROptions

Fields

ARFoundationSupport

EasyAR AR Foundation support. It is recommended to keep it enabled at all times, otherwise EasyAR may not work properly when using ARFoundation. Only recommend turning it off if future AR Foundation updates are incompatible 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 (e.g., AR Foundation) objects. This option is mainly designed for mobile AR, and the function will be disabled under default configuration on headsets.

If you need to control the switching of these components yourself, or if EasyAR's behavior interferes with the normal operation of some components, please make sure to turn off these options.

If you need to automatically switch AR Foundation at runtime, you need to create ARSession and XR Origin for AR Foundation 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 when awake.

At runtime, if the selected frame source inherits from ARFoundationFrameSource or implements the XROrigin origin ExternalDeviceFrameSource, the disabled Unity XR Core components and AR Foundation components will be enabled when StartSession() (those 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 when StartSession().

At runtime, all Unity XR Core components and AR Foundation components will be disabled when StopSession(bool).

Note that components of XR Interaction Toolkit are not controlled by this option, but whether they are available in EasyAR has not been verified. Theoretically, they should work normally for functions that only use the XROrigin GameObject and its Camera, but you may need to set CenterMode to SessionOrigin. If the function is not working, you need to manage the XR Interaction Toolkit components yourself and disable 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

Field Value