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.
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.
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:
In
Project Settings > XR Plug-in Management, select the current platform and checkInitialize XR On Startup.
If you need to control the initialization timing freely, ensure that AR Foundation initialization is called before EasyAR ARSession’s Assemble.
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.
It is recommended to set
RequirementtoOptionalandDepthtoOptionalinProject Settings > XR Plug-in Management > Google ARCoreto ensure the application can run on phones that do not support ARCore.
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.
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.