Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,9 @@ public static bool DrawHeaderToggle(string title, SerializedProperty group, Seri
/// <param name="contextAction">The context action</param>
/// <param name="hasMoreOptions">Delegate saying if we have MoreOptions</param>
/// <param name="toggleMoreOptions">Callback called when the MoreOptions is toggled</param>
/// <param name="documentationURL">Documentation URL</param>
/// <returns>return the state of the foldout header</returns>
public static bool DrawHeaderToggle(string title, SerializedProperty group, SerializedProperty activeField, Action<Vector2> contextAction = null, Func<bool> 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<Vector2> contextAction = null, Func<bool> hasMoreOptions = null, Action toggleMoreOptions = null)
=> DrawHeaderToggle(title, group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I understand correct, this change of the function signature introduced a hard crash for volume component and it has since been patched here: #2367


/// <summary>Draw a header toggle like in Volumes</summary>
/// <param name="title"> The title of the header </param>
Expand All @@ -470,9 +469,11 @@ public static bool DrawHeaderToggle(string title, SerializedProperty group, Seri
/// <param name="contextAction">The context action</param>
/// <param name="hasMoreOptions">Delegate saying if we have MoreOptions</param>
/// <param name="toggleMoreOptions">Callback called when the MoreOptions is toggled</param>
/// <param name="documentationURL">Documentation URL</param>
/// <returns>return the state of the foldout header</returns>
public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action<Vector2> contextAction = null, Func<bool> hasMoreOptions = null, Action toggleMoreOptions = null)
=> DrawHeaderToggle(title, group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, null);
public static bool DrawHeaderToggle(string title, SerializedProperty group, SerializedProperty activeField, Action<Vector2> contextAction, Func<bool> hasMoreOptions, Action toggleMoreOptions, string documentationURL)
=> DrawHeaderToggle(title, group, activeField, contextAction, hasMoreOptions, toggleMoreOptions, documentationURL);

/// <summary>Draw a header toggle like in Volumes</summary>
/// <param name="title"> The title of the header </param>
/// <param name="group"> The group of the header </param>
Expand All @@ -482,7 +483,7 @@ public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group,
/// <param name="toggleMoreOptions">Callback called when the MoreOptions is toggled</param>
/// <param name="documentationURL">Documentation URL</param>
/// <returns>return the state of the foldout header</returns>
public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action<Vector2> contextAction = null, Func<bool> hasMoreOptions = null, Action toggleMoreOptions = null, string documentationURL = null)
public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, Action<Vector2> contextAction, Func<bool> hasMoreOptions, Action toggleMoreOptions, string documentationURL)
{
var backgroundRect = GUILayoutUtility.GetRect(1f, 17f);

Expand Down