Skip to content

Commit

Permalink
[HDRP] Improve custom pass name UI #6859
Browse files Browse the repository at this point in the history
  • Loading branch information
alelievr authored and sebastienlagarde committed Feb 2, 2022
1 parent ebf58c7 commit 5caa585
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed using the wrong coordinate to compute the sampling direction for the screen space global illumination.
- Fixed error messages when trying to use HDSceneColor, NormalFromHeight, DDX, DDY or DDXY shader graph nodes in ray tracing.
- Fixed the roughness value used for screen space reflections and ray traced reflections to match environment lighting (case 1390916).
- Fixed custom pass name being cut when too long in the inspector.

## [12.1.4] - 2021-12-07

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ void DoHeaderGUI(ref Rect rect)

EditorGUI.BeginProperty(headerRect, GUIContent.none, m_PassFoldout);
{
EditorGUIUtility.labelWidth = headerRect.width;
m_PassFoldout.boolValue = EditorGUI.Foldout(headerRect, m_PassFoldout.boolValue, $"{m_Name.stringValue} ({m_PassType.Name})", true, EditorStyles.boldLabel);
EditorGUIUtility.labelWidth = 0;
}
EditorGUI.EndProperty();
EditorGUI.BeginProperty(enabledRect, Styles.enabled, m_Enabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
if (customPassType.GetCustomAttribute<HideInInspector>() != null)
continue;

tree.Add(new SearchTreeEntry(new GUIContent(customPassType.Name, icon))
tree.Add(new SearchTreeEntry(new GUIContent(ObjectNames.NicifyVariableName(customPassType.Name), icon))
{
level = 1,
userData = customPassType
Expand Down

0 comments on commit 5caa585

Please sign in to comment.