static internal void UpdateGraphicsSettings(UniversalRenderPipelineGlobalSettings newSettings)
 {
     if (newSettings == null || newSettings == cachedInstance)
     {
         return;
     }
     GraphicsSettings.RegisterRenderPipelineSettings <UniversalRenderPipeline>(newSettings as RenderPipelineGlobalSettings);
     cachedInstance = newSettings;
 }
 static internal void UpdateGraphicsSettings(HDRenderPipelineGlobalSettings newSettings)
 {
     if (newSettings == cachedInstance)
     {
         return;
     }
     if (newSettings != null)
     {
         GraphicsSettings.RegisterRenderPipelineSettings <HDRenderPipeline>(newSettings as RenderPipelineGlobalSettings);
     }
     else
     {
         GraphicsSettings.UnregisterRenderPipelineSettings <HDRenderPipeline>();
     }
     cachedInstance = newSettings;
 }
        void DrawAssetSelection()
        {
            var oldRenderPipelineSettings = renderPipelineSettings;

            using (new EditorGUILayout.HorizontalScope())
            {
                var newSettings = (TGlobalSettings)EditorGUILayout.ObjectField(renderPipelineSettings, typeof(TGlobalSettings), false);

                if (renderPipelineSettings != newSettings)
                {
                    if (newSettings != null)
                    {
                        GraphicsSettings.RegisterRenderPipelineSettings <TRenderPipeline>(newSettings);
                    }
                    else
                    {
                        if (EditorUtility.DisplayDialog($"Invalid {ObjectNames.NicifyVariableName(typeof(TGlobalSettings).Name)}", Styles.settingNullRPSettings, "Yes", "No"))
                        {
                            GraphicsSettings.UnregisterRenderPipelineSettings <TRenderPipeline>();
                        }
                    }

                    if (renderPipelineSettings != null && !renderPipelineSettings.Equals(null))
                    {
                        EditorUtility.SetDirty(renderPipelineSettings);
                    }
                }

                if (GUILayout.Button(Styles.newAssetButtonLabel, Styles.buttonOptions))
                {
                    Create(useProjectSettingsFolder: true, activateAsset: true);
                }

                bool guiEnabled = GUI.enabled;
                GUI.enabled = guiEnabled && (renderPipelineSettings != null);
                if (GUILayout.Button(Styles.cloneAssetButtonLabel, Styles.buttonOptions))
                {
                    Clone(renderPipelineSettings, activateAsset: true);
                }
                GUI.enabled = guiEnabled;
            }

            if (oldRenderPipelineSettings != renderPipelineSettings)
            {
                m_Editor = null;
            }
        }