Universal Render Pipeline
AR Foundation supports the Universal Render Pipeline (URP) versions 7.0.0 or later. See the URP Getting started page for more details on switching to URP.
Note
You can use either URP or the Built-in Render Pipeline with AR Foundation, but you should decide which render pipeline to use in your project before you start development.
Configure URP for AR Foundation
Create a Universal Render Pipeline Asset
Note
The steps for URP setup aren't specific to AR Foundation and are included to indicate how to convert an AR Foundation project with the Built-In Render Pipeline into a URP AR Foundation project. If you created your project from the URP Project Template or you already have a UniversalRenderPipelineAsset
and Universal Renderer
in your project, skip ahead to Configure your Universal Render Pipeline Asset.
To create a UniversalRenderPipelineAsset
and its corresponding Universal Renderer
:
- In the project's
Assets
folder, create a new folder namedRendering
. - In the
Rendering
folder, create a Universal Renderer asset for URP: Right-click anywhere in the folder and select Create > Rendering > Universal Render Pipeline > URP Asset (with Universal Renderer) from the context menu. This creates two assets:
Configure your Universal Render Pipeline Asset
Note
URP provides a pipeline conversion tool that builds a series of assets and pipelines to mimic the Built-in Render Pipeline. If you wish to use this tool you must either do it before assigning the ARBackgroundRenderFeature
to a renderer or make sure you go back and set the proper UniversalRenderPipelineAsset
as your project's Render Pipeline Asset.
To configure your UniversalRenderPipelineAsset
to work with AR Foundation:
Locate your
Universal Renderer
asset. If you created your project from the URP Project Template or used the pipeline conversion tool, multiple URP/Renderer assets were created for you in theSettings
folder in your project'sAssets
folder. Follow the next step for each Renderer asset.Select your
Universal Renderer
asset. In its Inspector, add anARBackgroundRendererFeature
to the list of Renderer Features. To use XR Simulation to test your application, set the Depth Priming Mode of your Renderer (located under the Rendering header) toDisabled
.(Optional) If your project uses the ARCore plugin with Vulkan Graphics API: Select your
Universal Renderer
asset. In its Inspector, add anARCommandBufferSupportRendererFeature
to the list of Renderer Features.
Note
If you created your project from the URP Project Template or used the pipeline conversion tool, your project has already been set up to switch between pipeline assets by configuring the Quality settings of your project. If you used these tools, the next step is optional.
- Access the Graphics settings (menu: Edit > Project Settings, then select Graphics), and select the
UniversalRenderPipelineAsset
in the Default Render Pipeline field. This URP asset will be used when you don't already have a pipeline asset assigned for the project's active Quality Level.