AR Foundation Configuration

Note

AR Foundation is not required when using EasyAR. You need to install and configure AR Foundation if you are going to enable EasyAR AR Foundation support, or use other features of AR Foundation.

Supported AR Foundation Versions in EasyAR

EasyAR Sense Unity Plugin supports AR Foundation 5 or later. Only Unity.XR.CoreUtils.XROrigin is supported, and ARSessionOrigin is not supported.

Attention

AR Foundation support is implemented as EasyAR Sense custom camera. EasyAR Sense will stop responding after a fixed and limited time per run if trial product (personal license, trial XR license, or trial Mega services, etc.) is being used with custom camera or HMD. There is no limitation when using a paid license for EasyAR Sense and paid EasyAR Mega service.

Install AR Foundation and ARCore/ARKit plugin

Reference AR Foundation Documents to install AR Foundation. AR Foundation, Google ARCore XR Plugin and Apple ARKit XR Plugin are needed.

../_images/image_g7_1.png

Attention

Ensure that the versions of Google ARCore XR Plugin and Apple ARKit XR Plugin match the version of AR Foundation exactly. Version mismatches may cause runtime errors.

../_images/image_g7_2.png

Configuring XR Plug-in Management

Follow the AR Foundation Introduction under Project Setup > Install AR Foundation for configuration. Be sure to select the version of AR Foundation you are using.

Generally, before using AR Foundation, you need to enable XR Plug-in Management in Unity to support AR Foundation:

  1. In Project Settings > XR Plug-in Management, select the current platform and check Initialize XR On Startup.

../_images/image_g7_3.png

If you need to control the initialization timing freely, ensure that AR Foundation initialization is called before EasyAR ARSession’s Assemble.

  1. In Project Settings > XR Plug-in Management, select the current platform and check the plug-in providers for the current platform.

    • For Android, select Google ARCore.

    • For iOS, select Apple ARKit.

../_images/image_g7_4.png ../_images/image_g7_5.png
  1. It is recommended to set Requirement to Optional and Depth to Optional in Project Settings > XR Plug-in Management > Google ARCore to ensure the application can run on phones that do not support ARCore.

../_images/image_g7_6.png

Configuring URP

If you are using URP, you need to perform specific configurations. Users of other rendering pipelines can skip this step.

Follow the AR Foundation Introduction under Project Setup > Universal Render Pipeline for configuration. Be sure to select the version of AR Foundation you are using.

Refer to Unity’s official documentation to correctly configure URP and add ARBackgroundRendererFeature. Details are not described here.

../_images/image_g7_8.png

Additionally, you still need to configure EasyAR’s EasyARCameraImageRendererFeature similarly, as described in Universal Render Pipeline (URP) Configuration, to ensure proper rendering for both EasyAR and AR Foundation.