Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# Upgrading Materials between HDRP versions

Between different High Definition Render Pipeline (HDRP) versions materials might need an upgrade to work properly. This page describes how the process works and how you can remedy potential issues.
Between different versions of the High Definition Render Pipeline (HDRP), you might need to upgrade materials for them to work. This page describes how to upgrade materials and how to fix issues.

## Automatic Material Upgrade

To determine whether a material upgrade is needed or not, HDRP checks if the value *m_LastMaterialVersion* in the file ProjectSettings/HDRPProjectSettings.asset is the latest required.
If it is not, all materials in the project will be reimported and saved to disk if they needed change. Note that if a version control system is used, then the materials will also be checked out before saving their content to disk.
To determine whether you need to upgrade a material, HDRP checks if the value `m_LastMaterialVersion` in the file ProjectSettings/HDRPProjectSettings.asset is the latest required.
If it's not, HDRP reimports all materials in the project and saves them to disk if they changed change.

When the upgrade is done and the materials are written to disk, the value of *m_LastMaterialVersion* is updated and written to HDRPProjectSettings.asset.
**Note**: If you use a version control system, the materials will also be checked out before saving their content to disk. If your version control system requires checkout operations (for example, Perforce), you must set it up correctly in your project before upgrading your materials. Otherwise, the material will be upgraded and the file marked as non read-only, but they won't be checked out by the VCS.

When a material saved with an older version of HDRP is imported, then this will also be upgraded automatically and written to disk when done.
When the upgrade has finished and the materials has been saved to disk, HDRP updates the value of `m_LastMaterialVersion` and writes the new value to HDRPProjectSettings.asset.

Please note that if a version control system that requires check out operations is in use (e.g. Perforce), it is important that it is correctly setup in the project before the upgrade operation happens. If this is not the case, the material will be upgraded and the file marked as non read-only, but they will not be checked out by the VCS.
When you import a material saved with an older version of HDRP, this material will also be upgraded automatically and written to disk.

## Manual Material Upgrade

In case the above process fails and a material is not working as expected when upgrading HDRP version, it is suggested to run the upgrade process manually. To do so, you can either:
In case the automatic material upgrade fails and a material isn't working as expected when upgrading an HDRP version, run the upgrade process manually. To do so, you can either:

- Open the [Render Pipeline Wizard](Render-Pipeline-Wizard.md) and under the **Project Migration Quick-links** click on the Upgrade HDRP Materials to Latest Version button. Or:
- Select **Edit > Render Pipelines > HD Render Pipeline > Upgrade from Previous Version > Upgrade HDRP Materials to Latest Version**
- Use the [Render Pipeline Wizard](Render-Pipeline-Wizard.md)
1. Open the Render Pipeline Wizard.
2. Go to **Project Migration Quick-links**
3. Click **Upgrade HDRP Materials to Latest Version**.
- Select **Edit** > **Render Pipelines** > **HD Render Pipeline** > **Upgrade from Previous Version** > **Upgrade HDRP Materials to Latest Version**.