protected virtual void Draw(TSerialized serialized, Editor owner) { HDProbeUI.Drawer <TProvider> .DrawToolbars(serialized, owner); EditorGUI.BeginChangeCheck(); showChromeGizmo = EditorGUILayout.Toggle(EditorGUIUtility.TrTextContent("Show Chrome Gizmo"), showChromeGizmo); if (EditorGUI.EndChangeCheck()) { SceneView.RepaintAll(); } HDProbeUI.Drawer <TProvider> .DrawPrimarySettings(serialized, owner); //note: cannot use 'using CED = something' due to templated type passed. CoreEditorDrawer <TSerialized> .Group( CoreEditorDrawer <TSerialized> .FoldoutGroup(HDProbeUI.k_ProxySettingsHeader, HDProbeUI.Expandable.Projection, HDProbeUI.k_ExpandedState, HDProbeUI.Drawer <TProvider> .DrawProjectionSettings), CoreEditorDrawer <TSerialized> .FoldoutGroup(HDProbeUI.k_InfluenceVolumeHeader, HDProbeUI.Expandable.Influence, HDProbeUI.k_ExpandedState, HDProbeUI.Drawer <TProvider> .DrawInfluenceSettings, HDProbeUI.Drawer_DifferentShapeError ), CoreEditorDrawer <TSerialized> .AdvancedFoldoutGroup(HDProbeUI.k_CaptureSettingsHeader, HDProbeUI.Expandable.Capture, HDProbeUI.k_ExpandedState, (s, o) => s.GetEditorOnlyData(SerializedHDProbe.EditorOnlyData.CaptureSettingsIsAdvanced), (s, o) => s.ToggleEditorOnlyData(SerializedHDProbe.EditorOnlyData.CaptureSettingsIsAdvanced), CoreEditorDrawer <TSerialized> .Group(DrawAdditionalCaptureSettings, HDProbeUI.Drawer <TProvider> .DrawCaptureSettings ), HDProbeUI.Drawer <TProvider> .DrawAdvancedCaptureSettings ), CoreEditorDrawer <TSerialized> .FoldoutGroup(HDProbeUI.k_CustomSettingsHeader, HDProbeUI.Expandable.Custom, HDProbeUI.k_ExpandedState, HDProbeUI.Drawer <TProvider> .DrawCustomSettings), CoreEditorDrawer <TSerialized> .Group(HDProbeUI.Drawer <TProvider> .DrawBakeButton) ).Draw(serialized, owner); }
/// <summary> /// Draws the shader stripping settinsg /// </summary> /// <param name="serialized">The serialized global settings</param> /// <param name="owner">The owner editor</param> /// <param name="additionalShaderStrippingSettings">Pass another drawer if you want to specify additional shader stripping settings</param> public static void DrawShaderStrippingSettings(ISerializedRenderPipelineGlobalSettings serialized, Editor owner, CoreEditorDrawer <ISerializedRenderPipelineGlobalSettings> .IDrawer additionalShaderStrippingSettings = null) { CoreEditorUtils.DrawSectionHeader(Styles.shaderStrippingSettingsLabel); var oldWidth = EditorGUIUtility.labelWidth; EditorGUIUtility.labelWidth = Styles.labelWidth; EditorGUILayout.Space(); using (new EditorGUI.IndentLevelScope()) { EditorGUILayout.PropertyField(serialized.shaderVariantLogLevel, Styles.shaderVariantLogLevelLabel); EditorGUILayout.PropertyField(serialized.exportShaderVariants, Styles.exportShaderVariantsLabel); additionalShaderStrippingSettings?.Draw(serialized, owner); } EditorGUILayout.Space(); EditorGUIUtility.labelWidth = oldWidth; }