# URP Upgrading

This section describes how to upgrade an SCK project to URP.

### Install the URP Package

Open the Package Manager and install the **Universal RP** package into your project.

### Create A URP Asset

After installing URP, it's necessary to create a Pipeline Asset for your project.

1. Right click in Project tab and select *Create* > *Rendering* > *Universal Render Pipeline* > *Pipeline Asset (Forward Renderer)*
2. Click *Edit* > *Project Settings* > *Graphics* and set the *Scriptable Render Pipeline Settings* field to the pipeline asset you just created.

### Upgrade Materials

After installing URP and creating the pipeline asset, the materials in your scenes will be pink, because they haven't yet been converted to URP materials. Let's do this now.

Click *Edit* > *Render Pipeline* > *Universal Render Pipeline* > *Upgrade Project Materials To UniversalRP Materials.*

### Import SRP Shaders

The kits come with URP compatible (shader graph) shaders for:

* The energy shield
* The target hologram

To set these up, simply import the SRP\_Shaders\_ClickMe unitypackage into the project. It will automatically update the shaders for the relevant materials in the project.

### Set Up Camera Layering

{% hint style="info" %}
If you are using the Mech Combat Kit you don't need this section.
{% endhint %}

In the Space Combat Kit, the Vehicle Camera uses layered cameras for rendering the background. This must be configured in URP or the Game View will just show blue.

Open the *Vehicle Camera* hierarchy and go *Horizontal Pivot > Vertical Pivot > Gimbal Child > MainCamera*, open the **Camera** component and set the *Render Type* to *Overlay*.

<figure><img src="https://3984030162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGkQwvhTHFjHi6seEQv%2Fuploads%2F7LnifS8mLqab6bbA2M6F%2Fimage.png?alt=media&#x26;token=260b24b3-fb0e-4e78-a1ed-edcd5b7120f8" alt=""><figcaption><p>Settings for main camera.</p></figcaption></figure>

Open the *Background* object's hierarchy and go to the *Camera* objec&#x74;*,* open the **Camera** component and in the *Stack* add the *Main Camera's* camera.

<figure><img src="https://3984030162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGkQwvhTHFjHi6seEQv%2Fuploads%2FSw9bdfz9RCFYGO9Kx3e8%2Fimage.png?alt=media&#x26;token=5e40c2f3-64ba-4156-86a5-5b29c9633694" alt=""><figcaption><p>Correct camera stack for URP.</p></figcaption></figure>

The cameras should now render correctly.

### Update Shader Keys

The UVC kits have several scripts that control shaders for visual effects. The main key used to access the color for Particle Unlit shaders in the built-in render pipeline was \_Color, but in the equivalent URP shader it is \_BaseColor.

#### Flash Controller

Open the Muzzle Flash prefab, find the Flash Controller script, and set the *Color Property Name* to \_BaseColor.

![](https://3984030162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGkQwvhTHFjHi6seEQv%2Fuploads%2FCUSmhy5dBeDkNT7LsD6a%2FFlashController.jpg?alt=media\&token=d3c4a3de-a666-4ba8-b794-d1725d2d4652)

#### Jet Exhaust Visual Effects Controller

On all your spaceship prefabs, in the hierarchy under the *Exhaust* object, you will find this component. Change **all** the shader color names to \_BaseColor.

![](https://3984030162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGkQwvhTHFjHi6seEQv%2Fuploads%2FTV1qDfi0Ga2Y0S2IiyGB%2FJetExhaustVisualEffectsController.jpg?alt=media\&token=5c2c11f7-0a4b-426c-a38a-595f1bef8a1c)

#### Effects Color Manager

This component is used as a generic way to control the color of effect shaders. On all prefabs that use it, set the Color ID to \_BaseColor.

![](https://3984030162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGkQwvhTHFjHi6seEQv%2Fuploads%2FbqlksTF4HMQmsCKGRMOq%2FEffectsColorManager.jpg?alt=media\&token=543fcb3d-1bf0-4d7c-944e-42cd444068ee)

#### Beam Weapon Unit

The Beam Weapon Unit component controls the color of various beam effects. Set all the Color Keys to \_BaseColor.

### Post Processing

URP has its own Post Processing that needs to be set up from scratch, please check out Unity's relevant documentation for more information.
