# Supported Unity Packages
# AR Foundation support
Wikitude SDK Extension - AR Foundation package provides all necessary assets to ensure support for Unity's AR Foundation.
Furthermore, it is required that the
Allow 'unsafe' code setting is enabled in Player Settings, to enable fast data transfer between AR Foundation and the Wikitude SDK.
# Configuring an AR Foundation scene
Assuming that the extension package is installed, there are three additional steps needed to configure the Wikitude SDK to support any AR Foundation scene:
- Add a GameObject with a Wikitude SDK component and add the camera and the session origin of the AR Foundation components to it (like seen in the image below).
- Set the
Ar Bridgemode to
- Add a GameObject with an
AR Foundation Plugincomponent as a child to the Wikitude SDK component.
After these steps, the Wikitude SDK is ready to work with various AR Foundation features like plane detection, occlusion, light estimation, reflection probes and other features that are listed in Unity's manual for AR Foundation (opens new window).
# AR Foundation Editor Remote
Starting with v9.6, the AR Foundation samples support the third party AR Foundation Editor Remote v4.7.0 and higher from the Asset Store (opens new window). This Editor extension can help to reduce iteration times during development by sending AR data from a remote AR application to the Editor.
The setup is fairly easy. After importing the Asset and installing the remote app with the helper tool located under
Plugins/ARFoundationRemoteInstaller/Installer, the next step is to input the IP address (which is shown on the remote app) into the settings file located under
Plugins/ARFoundationRemoteInstaller/Installer. Additionally, the
Enable Cpu Image Raw Planes option should be disabled to get downscaled images from the remote app.
Camera Frame Scale value in the
ARFoundationPlugin component will result in higher framerates but due to the smaller resolution of the image, that is inputted into the SDK, the recognition and tracking quality might not be on the same level as the quality on the deployed application. It is still very helpful to test augmentations in an AR Foundation environment in the Editor.
As mentioned above, the tracking quality with a reduced
Camera Frame Scale value might not be representative of the final quality achieved on a mobile device.
# Removing AR Foundation
If the samples (from the
Wikitude SDK Extension - AR Foundation package) were imported into the Assets directory, they should be deleted before removing the AR Foundation related packages. Once the samples are not present in the Assets directory anymore, the following dependencies have to be removed before the
Wikitude SDK Extension - AR Foundation package can be deleted from the project.
- AR Foundation
- ARCore XR Plugin
- ARKit XR Plugin
# Universal Render Pipeline support
Starting with v9.1, the Wikitude SDK includes support for Unity's Universal Render Pipeline (URP) and requires the following package to be installed from the
- Universal RP v7.2.1 or newer.
# Convert the sample scenes
There are several steps to be done, to convert the sample scenes to work with URP.
Follow these steps as seen in the Universal Render Pipeline Documentation (opens new window)
A Renderer Feature has to be added as seen in the AR Foundation Documentation (opens new window), to ensure AR Foundation is working with the Render Pipeline.
Use the Wikitude URP helper tool available in the
Windowdropdown menu under
Wikitude > URP Helperto apply required changes to the sample scenes.
# Manual scene conversion
If you finished steps 1. and 2. in the section above, you can also convert a scene manually by applying these modifications:
- Open your scene and choose the
Main Camerain the hierarchy. Set the
Render Typeof its Camera component to
Overlayin the Inspector.
- Choose the
Camera Frame Rendererin the hierarchy. Add the
Main Camerato the Stack of its Camera component in the Inspector.
Also adjust the shadow settings once in the URP Asset created in step 1.2. in the section above.
- The default
UniversalRenderPipelineAssethas a relatively high shadow distance of
50. In order to properly work with AR scenes set the distance value in the asset under
Shadows | Distanceto
- Also, apply
Four Cascadesto the
Shadows | Cascadesoption for optimal results.