Skip to content

Commit d0b7f95

Browse files
eturquinsebastienlagarde
authored andcommitted
Fixed logic of test on presence of HDRP asset that would wrongly trigger (#824)
a warning message when not in batch mode.
1 parent c52ab11 commit d0b7f95

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,17 @@ static void GetAllValidHDRPAssets()
394394
}
395395

396396
// Prompt a warning if we find 0 HDRP Assets.
397-
if (_hdrpAssets.Count == 0 && !Application.isBatchMode)
397+
if (_hdrpAssets.Count == 0)
398398
{
399-
if (EditorUtility.DisplayDialog("HDRP Asset missing", "No HDRP Asset has been set in the Graphic Settings, and no potential used in the build HDRP Asset has been found. If you want to continue compiling, this might lead to VERY long compilation time.", "Ok", "Cancel"))
400-
throw new UnityEditor.Build.BuildFailedException("Build canceled");
401-
}
402-
else
403-
{
404-
Debug.LogWarning("There is no HDRP Asset provided in GraphicsSettings. Build time can be extremely long without it.");
399+
if (!Application.isBatchMode)
400+
{
401+
if (EditorUtility.DisplayDialog("HDRP Asset missing", "No HDRP Asset has been set in the Graphic Settings, and no potential used in the build HDRP Asset has been found. If you want to continue compiling, this might lead to VERY long compilation time.", "Ok", "Cancel"))
402+
throw new UnityEditor.Build.BuildFailedException("Build canceled");
403+
}
404+
else
405+
{
406+
Debug.LogWarning("There is no HDRP Asset provided in GraphicsSettings. Build time can be extremely long without it.");
407+
}
405408
}
406409

407410
/*

0 commit comments

Comments
 (0)