# Supported Unity Packages

# AR Foundation support

The 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 Bridge mode to Plugin.
  • Add a GameObject with an AR Foundation Plugin component as a child to the Wikitude SDK component.
AR Foundation Settings

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.

AR Foundation Editor Remote settings

A low 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.

AR Foundation Plugin's camera frame scaling settings

Important

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 Package Manager:

  • 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.

  1. Follow these steps as seen in the Universal Render Pipeline Documentation (opens new window)

    1. Installing URP (opens new window)
    2. Creating a URP Asset (opens new window)
    3. Adding the Asset to the Graphics settings (opens new window)
    4. Upgrading the built-in shaders (opens new window)
  2. 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.

  3. Use the Wikitude URP helper tool available in the Window dropdown menu under Wikitude > URP Helper to apply required changes to the sample scenes.

    URP Helper Tool

# 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:

  1. Open your scene and choose the Main Camera in the hierarchy. Set the Render Type of its Camera component to Overlay in the Inspector.
  2. Choose the Camera Frame Renderer in the hierarchy. Add the Main Camera to 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.

  1. The default UniversalRenderPipelineAsset has a relatively high shadow distance of 50. In order to properly work with AR scenes set the distance value in the asset under Shadows | Distance to 5.
  2. Also, apply Four Cascades to the Shadows | Cascades option for optimal results.