22using System . Collections . Generic ;
33using System . Reflection ;
44using System . Text ;
5+ using UnityEditor . Inspector . GraphicsSettingsInspectors ;
56using UnityEngine ;
67using UnityEngine . Rendering ;
78using UnityEngine . Rendering . Universal ;
@@ -26,6 +27,20 @@ static class StringBuilderPool
2627
2728 internal partial class UniversalRenderPipelineAssetUI
2829 {
30+ private static class GraphicsSettingPanelButton
31+ {
32+ private const int k_OpenGraphicsSettingsPanelLeftMargin = 18 ;
33+ private static GUIStyle ButtonStylingWithInspectorIndent ( )
34+ {
35+ var style = GUI . skin . button ;
36+ style . margin . left = k_OpenGraphicsSettingsPanelLeftMargin ;
37+ return style ;
38+ }
39+ public const string k_OpenGraphicsSettingsPanelButtonText = "Open Project Settings > Graphics ..." ;
40+ public const string k_OpenGraphicsSettingsPanelButtonPath = "Project/Graphics" ;
41+ public readonly static Lazy < GUIStyle > s_OpenGraphicsSettingsPanelButtonStyle = new ( ( ) => ButtonStylingWithInspectorIndent ( ) ) ;
42+ }
43+
2944 internal enum Expandable
3045 {
3146 Rendering = 1 << 1 ,
@@ -170,7 +185,13 @@ static void DrawRendering(SerializedUniversalRenderPipelineAsset serialized, Edi
170185 -- EditorGUI . indentLevel ;
171186
172187 if ( brgStrippingError )
188+ {
173189 EditorGUILayout . HelpBox ( Styles . brgShaderStrippingErrorMessage . text , MessageType . Warning , true ) ;
190+ if ( GUILayout . Button ( GraphicsSettingPanelButton . k_OpenGraphicsSettingsPanelButtonText , GraphicsSettingPanelButton . s_OpenGraphicsSettingsPanelButtonStyle . Value ) )
191+ {
192+ GraphicsSettingsInspectorUtility . OpenAndScrollTo ( "m_BrgStripping" ) ;
193+ }
194+ }
174195 if ( lightingModeError )
175196 EditorGUILayout . HelpBox ( Styles . lightModeErrorMessage . text , MessageType . Warning , true ) ;
176197 if ( staticBatchingWarning )
0 commit comments