public override void OnEditorGUI() { using (new UnityEditor.EditorGUILayout.VerticalScope()) { m_DebugPanel.GetDebugItem(DebugDisplaySettings.kEnableShadowDebug).handler.OnEditorGUI(); DebugItem shadowDebug = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowDebugMode); shadowDebug.handler.OnEditorGUI(); if ((ShadowMapDebugMode)shadowDebug.GetValue() == ShadowMapDebugMode.VisualizeShadowMap) { EditorGUI.indentLevel++; DebugItem shadowSelectionDebug = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowSelectionDebug); shadowSelectionDebug.handler.OnEditorGUI(); if (!(bool)shadowSelectionDebug.GetValue()) { m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowMapIndexDebug).handler.OnEditorGUI(); } EditorGUI.indentLevel--; } if ((ShadowMapDebugMode)shadowDebug.GetValue() == ShadowMapDebugMode.VisualizeAtlas) { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowAtlasIndexDebug).handler.OnEditorGUI(); EditorGUI.indentLevel--; } DebugItem shadowMinValue = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowMinValueDebug); shadowMinValue.handler.OnEditorGUI(); DebugItem shadowMaxValue = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowMaxValueDebug); shadowMaxValue.handler.OnEditorGUI(); DebugItem lightingDebugModeItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kLightingDebugMode); lightingDebugModeItem.handler.OnEditorGUI(); if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.SpecularLighting) { EditorGUI.indentLevel++; DebugItem overrideSmoothnessItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessDebug); overrideSmoothnessItem.handler.OnEditorGUI(); if ((bool)overrideSmoothnessItem.GetValue()) { m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessValueDebug).handler.OnEditorGUI(); } EditorGUI.indentLevel--; } else if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.DiffuseLighting) { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDebugLightingAlbedo).handler.OnEditorGUI(); EditorGUI.indentLevel--; } m_DebugPanel.GetDebugItem(DebugDisplaySettings.kFullScreenDebugMode).handler.OnEditorGUI(); m_DebugPanel.GetDebugItem(DebugDisplaySettings.kTileDebug).handler.OnEditorGUI(); DebugItem displaySkyReflecItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDisplaySkyReflectionDebug); displaySkyReflecItem.handler.OnEditorGUI(); if ((bool)displaySkyReflecItem.GetValue()) { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kSkyReflectionMipmapDebug).handler.OnEditorGUI(); EditorGUI.indentLevel--; } } }
public override void OnEditorGUI() { using (new UnityEditor.EditorGUILayout.VerticalScope()) { DebugItem shadowDebug = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowDebugMode); shadowDebug.handler.OnEditorGUI(); if ((ShadowMapDebugMode)shadowDebug.GetValue() == ShadowMapDebugMode.VisualizeShadowMap) { EditorGUI.indentLevel++; DebugItem shadowSelectionDebug = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowSelectionDebug); shadowSelectionDebug.handler.OnEditorGUI(); if (!(bool)shadowSelectionDebug.GetValue()) { m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowMapIndexDebug).handler.OnEditorGUI(); } EditorGUI.indentLevel--; } if ((ShadowMapDebugMode)shadowDebug.GetValue() == ShadowMapDebugMode.VisualizeAtlas) { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowAtlasIndexDebug).handler.OnEditorGUI(); EditorGUI.indentLevel--; } DebugItem shadowMinValue = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowMinValueDebug); shadowMinValue.handler.OnEditorGUI(); DebugItem shadowMaxValue = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kShadowMaxValueDebug); shadowMaxValue.handler.OnEditorGUI(); DebugItem lightingDebugModeItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kLightingDebugMode); lightingDebugModeItem.handler.OnEditorGUI(); if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.SpecularLighting) { EditorGUI.indentLevel++; DebugItem overrideSmoothnessItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessDebug); overrideSmoothnessItem.handler.OnEditorGUI(); if ((bool)overrideSmoothnessItem.GetValue()) { m_DebugPanel.GetDebugItem(DebugDisplaySettings.kOverrideSmoothnessValueDebug).handler.OnEditorGUI(); } EditorGUI.indentLevel--; } else if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.DiffuseLighting) { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDebugLightingAlbedo).handler.OnEditorGUI(); EditorGUI.indentLevel--; } var fullScreenDebugModeHandler = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kFullScreenDebugMode); fullScreenDebugModeHandler.handler.OnEditorGUI(); var fullScreenDebugMipHandler = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kFullScreenDebugMip); var fullScreenDebugModeValue = (FullScreenDebugMode)fullScreenDebugModeHandler.GetValue(); switch (fullScreenDebugModeValue) { case FullScreenDebugMode.PreRefractionColorPyramid: case FullScreenDebugMode.FinalColorPyramid: case FullScreenDebugMode.DepthPyramid: { EditorGUI.indentLevel++; fullScreenDebugMipHandler.handler.OnEditorGUI(); EditorGUI.indentLevel--; break; } default: fullScreenDebugMipHandler.SetValue(0f); break; } DebugItem tileClusterDebug = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kTileClusterDebug); tileClusterDebug.handler.OnEditorGUI(); if ((int)tileClusterDebug.GetValue() != 0 && (int)tileClusterDebug.GetValue() != 3) // None and FeatureVariant { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kTileClusterCategoryDebug).handler.OnEditorGUI(); EditorGUI.indentLevel--; } DebugItem displaySkyReflecItem = m_DebugPanel.GetDebugItem(DebugDisplaySettings.kDisplaySkyReflectionDebug); displaySkyReflecItem.handler.OnEditorGUI(); if ((bool)displaySkyReflecItem.GetValue()) { EditorGUI.indentLevel++; m_DebugPanel.GetDebugItem(DebugDisplaySettings.kSkyReflectionMipmapDebug).handler.OnEditorGUI(); EditorGUI.indentLevel--; } } }