You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewBuildFailedException("Build canceled by user due to HDRP configuration issues.");
50
+
}
51
+
52
+
46
53
GatherShaderFeatures();
47
54
}
48
55
}
49
56
57
+
privatestaticboolIsConfigurationValid()
58
+
{
59
+
// Validate the configuration of the HDRP assets for the current build target. We want to make sure that users are aware of potential performance issues or unsupported features before building.
60
+
// We still want to build the player even if the configuration is not optimal, but we log warnings to inform users about potential issues.
61
+
// Note that we validate the configuration of all HDRP assets included in the build, not just the one assigned in Graphics Settings.
62
+
// This is because users can have multiple HDRP assets in their project and switch between them at runtime, so we want to make sure that all of them are correctly configured for the target platform.
63
+
64
+
// We must log all the warnings, and avoid doing validConfiguration &= ValidationXXX, that will avoid logging all the warnings, and only log the first one that fails.
65
+
// This way users will have a complete overview of all the potential issues with their configuration, and can fix them all at once, instead of having to go through multiple build iterations to fix each issue one by one.
66
+
// So be carefull when you edit this code, and make sure to log all the warnings, even if one of the validation fails.
Debug.LogWarning($"HDRP Build Validation - Subsurface Scattering: Subsurface Scattering is enabled for {namedBuildTarget.TargetName}. For optimal performance, set the Downsample Level to the maximum value (2) for this platform.");
Debug.LogWarning($"HDRP Build Validation - Film Grain: Film Grain is enabled for {namedBuildTarget.TargetName}. This may significantly impact performance and should be disabled for this platform.");
publicstaticreadonlyGUIContentsupportedRayTracingMode=EditorGUIUtility.TrTextContent("Supported Ray Tracing Mode");
187
187
publicstaticreadonlyGUIContentsupportVFXRayTracing=EditorGUIUtility.TrTextContent("Visual Effects Ray Tracing","When enabled, Visual Effects Outputs which have Enable Ray Tracing on will be accounted for in Ray-traced effects.");
188
-
publicstaticreadonlyGUIContentrayTracingRestrictionOnlyWarning=EditorGUIUtility.TrTextContent("Ray tracing is currently only supported on DX12, Playstation 5 and Xbox Series X.",null,CoreEditorStyles.iconWarn);
188
+
publicstaticreadonlyGUIContentrayTracingRestrictionOnlyWarning=EditorGUIUtility.TrTextContent("Ray tracing requires DX12 on Windows. Disable Auto Graphics API and set Direct3D 12 as the first Graphics API in Player Settings. You can use the HDRP Wizard to configure these settings.",null,CoreEditorStyles.iconWarn);
189
+
publicstaticstringrayTracingNotSupportedBuildTarget=L10n.Tr("The {0} does not support Ray tracing. Consider disabling it or switch to a platform that supports it.");
189
190
publicstaticreadonlyGUIContentrayTracingMSAAUnsupported=EditorGUIUtility.TrTextContent("When Ray tracing is enabled in asset, MSAA is not supported. Please refer to the documentation.");
190
191
publicstaticreadonlyGUIContentwaterMSAAUnsupported=EditorGUIUtility.TrTextContent("When Water is enabled in asset, MSAA is not supported. Please refer to the documentation.");
0 commit comments