Quick Reference to Setup Universal Render Pipeline for Unity Projects
Tags: unity3d, programming, productivity, development
Published: 2024-03-20 15:01:03



> This article is originally posted on Medium. Check it out if you are a member! [Link to article](https://medium.com/codex/quick-reference-to-setup-universal-render-pipeline-for-unity-projects-f367df1747b9).

Universal Render Pipeline (URP) is something that I would need to set up whenever I want to use shader graphs in my Unity projects. However, more often so than not, I will forget how to set up URP since it is typically set up only once. Hence, this story is simply a short step-by-step writeup on how to set up URP for Unity projects. Enjoy :)

PS: At the point of writing, I am using the `Unity 2022.3` version.

---

## Guide

### Step 1: Install URP from the Unity Package Manager

![Step 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xlum9bk8hnr8wklq2iha.png)

1. Open up the package manager (**Top bar -> window -> package manager**).
2. Select Packages: **Unity Registry**.
3. Search for **Universal RP**.
4. Click on **Install.**

### Step 2: Create the Universal Render Pipeline Asset

![Step 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8z89wup6zo9aqeyh7eae.png)

URP Asset is an instance of the rendering pipeline that contains all the rendering and quality settings for the project. To create the asset,

1. Go to the Project window, and create a new folder (Eg. **Renderer**).
2. Right-click to create the URP asset (**Create -> Rendering -> URP Asset**). For 2D projects, I typically use `URP Asset (with 2D Renderer`), and for 3D projects, I use `URP Asset (with Universal Renderer`).

### Step 3: Set URP as Active Render Pipeline

![Step 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f8je3nytj86wwn43hgme.png)

1. Open project settings (**Top bar -> Edit -> Project Settings -> Graphics**).
2. In the **Scriptable Render Pipeline Settings** field, select the URP Asset that you created in the previous step. Click on continue.

The graphics settings will be changed immediately.

### Step 4: Set URP Asset for Quality Levels (Optional)

![Step 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/91onnvp27rj0lo2rpr3w.png)

1. Open project settings (**Top bar -> Edit -> Project Settings -> Quality**).
2. In the **Render Pipeline Asset** field, select the URP Asset that you created in the previous step. Click on continue.

### Step 5: Fix the Incompatible Shader Issue

![Step 5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vr0uo0apdaqmtyatl31w.png)

After step 3, you will notice that your project is pink. This is probably due to incompatible shaders. Unity requires shaders that are specifically designed for URP and assets using incompatible shaders may appear pink (this "missing material" colour). You can try the following:

#### Step 5 (Option 1): Render Pipeline Converter

![Step 5a](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/veyvdz00ib79moyvudhb.png)

Convert the Built-in Render pipeline to URP-compatible Unity shaders.

1. Open **Render Pipeline Converter (Top bar -> Window-> Rendering -> Render Pipeline Converter)**.
2. Check **Rendering Settings** and **Material Upgrade**.
3. Click on **Initialize Converters**.
4. Click on **Initialize And Convert**.

#### Step 5 (Option 2): Use the Upgrade Material Script

![Step 5b](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vf2jyan8os0pnay6yfsp.png)

- Select your materials and run the script (**Top bar -> Edit -> Rendering -> Materials -> Convert Selected Built-in Materials to URP**).

#### Step 5 (Option 3): Manually Update Material's Shader

![Step 5c](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7220eyvaf8mxhsk5j35.png)

- Select your "Pink" object and assign an appropriate shader to the material. In the example above, Instead of `Default Material`, we should use `Lit Material`.

---

## References

Most of the content stated above can be found in the following tutorials:

- [Unity Docs - Installing the Universal Render Pipeline into an existing Project](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@16.0/manual/InstallURPIntoAProject.html)
- [Youtube (DA LAB) - How to Turn on Universal Render Pipeline in Unity](https://www.youtube.com/watch?v=aJ1OpirisGM)
- [Youtube (Square One Tutorials) - 115 - Fix pink textures in Unity 2024](https://www.youtube.com/watch?v=-KWjUD-PJbA)

---

That's all! Hope this was useful to you. Thanks for reading~ Follow me for more random development tips :)