From e162dc7ae5fe693c6d1b97053b44d76295c8925d Mon Sep 17 00:00:00 2001 From: John Parsaie Date: Mon, 26 Oct 2020 17:01:16 -0400 Subject: [PATCH] Initial commit (#2384) --- .../Editor/RenderPipeline/HDEditorUtils.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDEditorUtils.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDEditorUtils.cs index 48538af38d3..759485b4de1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDEditorUtils.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDEditorUtils.cs @@ -299,19 +299,23 @@ internal static void HandlePrefixLabelWithIndent(Rect totalPosition, Rect labelP /// internal class IndentScope : GUI.Scope { + int m_Offset; + public IndentScope(int offset = 16) { + m_Offset = offset; + // When using EditorGUI.indentLevel++, the clicking on the checkboxes does not work properly due to some issues on the C++ side. // This scope is a work-around for this issue. GUILayout.BeginHorizontal(); EditorGUILayout.Space(offset, false); GUILayout.BeginVertical(); - EditorGUIUtility.labelWidth -= offset; + EditorGUIUtility.labelWidth -= m_Offset; } protected override void CloseScope() { - EditorGUIUtility.labelWidth = 0f; + EditorGUIUtility.labelWidth += m_Offset; GUILayout.EndVertical(); GUILayout.EndHorizontal(); }