From b09a3c9594e71ea795f494e476ba5e842dd2e0e1 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Sun, 25 Oct 2020 12:57:30 +0100 Subject: [PATCH] Fix ambiguous call to DrawHeaderToggle in Core --- .../Editor/CoreEditorUtils.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs b/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs index 35059adcfab..4fe71d7342e 100644 --- a/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs +++ b/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs @@ -458,10 +458,9 @@ public static bool DrawHeaderToggle(string title, SerializedProperty group, Seri /// The context action /// Delegate saying if we have MoreOptions /// Callback called when the MoreOptions is toggled - /// Documentation URL /// return the state of the foldout header - public static bool DrawHeaderToggle(string title, SerializedProperty group, SerializedProperty activeField, Action contextAction = null, Func hasMoreOptions = null, Action toggleMoreOptions = null, string documentationURL = null) - => DrawHeaderToggle(EditorGUIUtility.TrTextContent(title), group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, documentationURL); + public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action contextAction = null, Func hasMoreOptions = null, Action toggleMoreOptions = null) + => DrawHeaderToggle(title, group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, null); /// Draw a header toggle like in Volumes /// The title of the header @@ -470,9 +469,11 @@ public static bool DrawHeaderToggle(string title, SerializedProperty group, Seri /// The context action /// Delegate saying if we have MoreOptions /// Callback called when the MoreOptions is toggled + /// Documentation URL /// return the state of the foldout header - public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action contextAction = null, Func hasMoreOptions = null, Action toggleMoreOptions = null) - => DrawHeaderToggle(title, group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, null); + public static bool DrawHeaderToggle(string title, SerializedProperty group, SerializedProperty activeField, Action contextAction, Func hasMoreOptions, Action toggleMoreOptions, string documentationURL) + => DrawHeaderToggle(title, group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, documentationURL); + /// Draw a header toggle like in Volumes /// The title of the header /// The group of the header @@ -482,7 +483,7 @@ public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, /// Callback called when the MoreOptions is toggled /// Documentation URL /// return the state of the foldout header - public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action contextAction = null, Func hasMoreOptions = null, Action toggleMoreOptions = null, string documentationURL = null) + public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action contextAction, Func hasMoreOptions, Action toggleMoreOptions, string documentationURL) { var backgroundRect = GUILayoutUtility.GetRect(1f, 17f);