Sea otter in a circleSea Otter Games

#4 - How to install the Universal Render Pipeline (URP) on your Unity project

By Hugo on 2023-12-17
Game Development
Unity
Tutorial

In my previous article, I talked about dynamic lighting in Unity. It requires installing URP on your Unity project. I overlooked the explanation of URP’s installation because it would have made for a very long article (which it already is 😕). But I felt it could still be useful to people, so tag along if you want to use URP in your project.

Precisions

This guide was done on Unity 2022. We will focus on the installation of the 2D components but the same process can be used to get access to 3D components.

Installation

URP is a built-in package. As such, open your package manager by clicking on Window > Package Manager. Select Unity registry in the top-left corner of the window that just opened and search for “Universal RP” in the search bar. Click on the “install” button.

A screenshot of the package manager in Unity. It shows the Universal RP package.
The package can be found under Universal RP

Now, it is time to use it in our project. Create a new folder from the “project” tab and click Create > Rendering > URP Asset. We will choose “with 2D Renderer” but you can select the other one if you do not plan on using it for 2D lighting. As the precision implies, this should also generate you a Renderer. If it did not or if you lost this second component, you can recreate one in the same menu.

A screenshot of the create menu in Unity. It shows the Universal RP asset and its renderer.
The URP assets and renderers

💡 If you create a new renderer, it will have to be set in the URP Asset. Otherwise, the default renderer should be set by default.

The URP asset must then be set in your project settings: go to Edit > Project settings. In the “graphics“ tab, put your URP asset in the “Scriptable render pipeline settings” field.

A screenshot of the project settings graphics tab in Unity. It shows the Universal RP asset.

If everything went well until here, you should now see new elements in Create > Light.

A screenshot of the hierarchy create menu in Unity. It shows the four 2d light components.
Those four components should now be available

Finally, all that remains is to convert your assets to be compatible with URP. To do this simply go to Windows > Rendering > Render pipeline converter

A screenshot of the URP asset converter menu.
A view of the URP asset converter

From here select "Built-in to URP" in the dropdown menu. Enable "Material upgrade" and click on "Initialize convertes" and then on "Convert assets".

You should now be ready to use the Universal Render Pipeline in your Unity project. Congrats!
Thank you for reading to the end! I hope to see you in the next post. 🦦

© Copyright 2024 - 🦦 Sea Otter Games