Getting Started with Unity’s URP and Skyboxes

In my previous article, I exported my game scene into a Unity Package and started a new URP (Universal Render Pipeline) project.

Once the URP default template is loaded, I can drag the exported package directly into the Project folder.

At first I had this error and I wasn’t sure why. I added the first person starter assets from Unity to my game scene to test it out. There are some cinemachine import errors to say the least, basically coming down to the reasoning that I don’t need to export it because it is a free package in the Unity store that can be easily imported into the new project after.

After removing the starter package from my project, the exported game scene imports without errors.

A preview is displayed for the import, which gives me the option to include or exclude various assets for the incoming package.

After pressing the import button, you can double-click on the scene to load it. Your environment might become bright pink and show no details.

Here is the structure from outside showing all kinds of hot pink.

This is the culprit right here. The standard shader, which just about every object in the scene has, does not apply in the URP. The shader needs to be changed to a recognizable URP shader. This can be done via this drop down individually per object in the scene, but that should be reserved for objects that do not comply with a general URP overhaul.

A fast way to automatically scan your scene for objects that need a shader conversion, go to Edit>Render Pipeline>Universal Render Pipeline>Upgrade Materials to UniversalRP Materials.

After your computer is done processing, your scene should be once again visible, sans the hot pink flare.

The Lightmapping Settings offer a Progressive GPU option, which will preview real time lighting updates.

As seen here in the Unity description, the Auto Generate option will update changes to the lighting info in real time.

When I imported my scene package, I received a warning message about my skybox material not being compatible with the URP. The default skybox material is also a Unity provided material. Let’s remake it so we can edit it further. Create a new folder for the Skybox related assets, and then create a new material called Skybox inside.

In Lighting>Environment>Skybox Material, drag in the new skybox material we just created.

This error will most likely show up telling the user that this material is not supported by the URP.

Select the new Skybox material and then check out the Shader options in the inspector.

This is what the current Universal Render Pipeline/Lit looks like in the scene view. Not exactly what I am going for with the skybox.

Select the Shader drop-down, and find the Skybox option. Select the Procedural skybox.

The scene view now shows that the default skybox look has been restored.

Because this is a custom Skybox material and not a default Unity one, there are some more options available.

Exposure

Atmosphere Thickness

Sun Size

Sun Size Convergence

Adjusting the directional light in your scene will reposition the sun in your environment.

Here is another view of the directional light moving the sun in the scene view.

In the lighting tab, in Environment option, the Intensity Multiplier can be moved up and down to greatly increase or decrease the environment lighting coming from the skybox.

If you have a complex lightbox setup needing some higher definition, the Resolution option has you covered.

Thanks for reading along with this introduction to Unity’s URP and Skyboxes!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store