Version: Unity 6.5 Alpha (6000.5)
Language : English
Upgrading from the Built-In Render Pipeline to URP
Upgrade custom shaders for URP compatibility

Convert assets and quality levels from the Built-In Render Pipeline to URP

After you configure your project to use URP, use the Render Pipeline Converter to convert material references, shadersA program that runs on the GPU. More info
See in Glossary
, and quality levels made for a Built-In Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
project to be compatible with the Universal Render Pipeline (URP).

Note: The Render Pipeline Converter doesn’t support converting custom shaders. For more information on how to convert custom shaders, refer to Upgrade custom shaders for URP compatibility.

Warning: The following task overwrites several files in your project folder. These can’t be restored after Unity overwrites them. Before you start this task, back up any files you don’t want to lose.

Convert material references, shaders, and quality levels using the Render Pipeline Converter

To convert read-only material references, prebuilt shaders, and quality levels from the Built-In Render Pipeline to the Universal Render Pipeline (URP), do the following:

  1. Go to Window > Rendering > Render Pipeline Converter.

    Unity opens the Render Pipeline Converter window.

  2. Set Source Pipeline to Built-in.

  3. Set Target Pipeline to Universal Render Pipeline (Universal Renderer).

  4. Select the checkboxes next to your Material Reference Converter, Material Shader Converter, and Rendering Settings.

    If you have animation clips or Post-ProcessingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
    See in Glossary
    Stack v2 assets in your project, also select the checkboxes next to Animation ClipAnimation data that can be used for animated characters or simple animations. It is a simple “unit” piece of motion, such as (one specific instance of) “Idle”, “Walk” or “Run”. More info
    See in Glossary
    and Post-Processing Stack v 2. For more information on these converters, refer to Render Pipeline Converter window for URP reference.

  5. Select Scan.

    Unity processes the assets in your project and displays the list of materials and levels it can convert under your selected converters.

  6. Select the checkboxes next to the assets you want to convert.

  7. Select Convert Assets.

    When Unity finishes the conversion process, the window displays the status of each conversion.

For more information on what material references, shaders, and quality levels Unity converts to, refer to the following:

Convert materials using API

Note: This method is deprecated. Use Convert assets using CLI instead.

You can also convert materials using the Converters class with RunInBatchMode.

For example, the following script initializes and executes the Material Upgrade and Read-only Material Converter converters.

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Rendering.Universal;
using UnityEngine;

public class MyUpgradeScript : MonoBehaviour
{
    public static void ConvertBuiltinToURPMaterials()
    {
        Converters.RunInBatchMode(
            ConverterContainerId.BuiltInToURP
            , new List<ConverterId> {
                ConverterId.Material,
                ConverterId.ReadonlyMaterial
            }
            , ConverterFilter.Inclusive
        );
        EditorApplication.Exit(0);
    }
}

To run the example conversion from the command line, use the following command:

"<path to Unity application> -projectPath <project path> -batchmode -executeMethod MyUpgradeScript.ConvertBuiltinToURPMaterials

Convert assets using CLI

You can run the conversion process from the command line, using the Converters class with RunInBatchMode methods.

Use the RunInBatchModeCmdLine command with the following commands and options:

Command Description
--help Shows help and exit.
--list Lists all available containers and their converters.
Option Description
-container Defines the name of the container to be batched. This is required. Use the --list command to find the possible values.
--inclusive Includes the list of converters specified with -typesFilter when batching. You must also provide values for -typesFilter. Using either --inclusive or --exclusive is required. Do not use both.
--exclusive Excludes the list of converters specified with -typesFilter when batching. Using either --inclusive or --exclusive is required. Do not use both.
-typesFilter Defines the list of converters to include or exclude from batching. These converters must be part of the container you pass in for them to run. Use the --list command to find the possible values. These values must be provided as a space-separated list, for example, -typesFilter typeA typeB typeC. Adding values is required when using --inclusive, and optional when using --exclusive.

For example, the following command initializes and executes Material Reference Converter and Material Shader Converter from the command line.

<path to Unity application> -projectPath <project path> -batchmode -executeMethod UnityEditor.Rendering.Universal.Converters.RunInBatchModeCmdLine -container BuiltInToURP -typesFilter Material --inclusive ReadonlyMaterial

Additional resources

Upgrading from the Built-In Render Pipeline to URP
Upgrade custom shaders for URP compatibility