Skip to content

Commit 90cb30a

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.3] Correct cases where we could fail to update HDRP VolumeProfile component list
1 parent 297cd57 commit 90cb30a

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

Packages/com.unity.render-pipelines.high-definition/Editor/BuildProcessors/HDRPPreprocessBuild.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,19 @@ public void OnPreprocessBuild(BuildReport report)
4141

4242
ConfigureMinimumMaxLoDValueForAllQualitySettings();
4343

44-
if (HDRenderPipelineGlobalSettings.instance.TryInitializeDefaultVolumeProfile(out var defaultVolumeProfileSettings) ||
45-
VolumeProfileUtils.TryEnsureAllOverridesForDefaultProfile(defaultVolumeProfileSettings?.volumeProfile))
44+
if (HDRenderPipelineGlobalSettings.instance.TryInitializeDefaultVolumeProfile(out var defaultVolumeProfileSettings))
4645
{
47-
Debug.Log("Default Volume Profile has been modified to ensure all overrides are present. This is required to avoid missing overrides at runtime which can lead to unexpected rendering issues. Please save these changes to avoid this message in the future.");
46+
Debug.Log("Default Volume Profile has been created or Diffusion Profiles have been updated to ensure all components are present. This is required to avoid missing overrides at runtime which can lead to unexpected rendering issues. Please save these changes to avoid this message in the future.");
47+
}
48+
49+
if (defaultVolumeProfileSettings == null)
50+
{
51+
throw new BuildFailedException("Failed to initialize the Default Volume Profile. A Default Volume Profile is required for HDRP to function properly.");
52+
}
53+
54+
if (VolumeProfileUtils.TryEnsureAllOverridesForDefaultProfile(defaultVolumeProfileSettings.volumeProfile))
55+
{
56+
Debug.Log("Default Volume Profile has been modified to ensure all components are present. This is required to avoid missing overrides at runtime which can lead to unexpected rendering issues. Please save these changes to avoid this message in the future.");
4857
}
4958

5059
LogIncludedAssets(m_BuildData.renderPipelineAssets);

0 commit comments

Comments
 (0)