Skip to content

Commit 7044c7e

Browse files
committed
FIX: Parameter-less processors and interactions show a plain header instead of an empty foldout in the Input Actions editor [UUM-144325]
In the UITK Input Actions editor's Action Properties view, every processor/interaction list item was rendered with an expandable foldout regardless of whether it had any editable parameters, so a parameter-less processor such as "Invert" showed a foldout whose arrow animated on click but revealed no content. The NameAndParametersListViewItem(VisualElement root, ParameterListView parameterListView, ButtonProperties buttonProperties) constructor now gates the foldout content on parameterListView.hasUIToShow. When there are no editable parameters it hides the header toggle's expand arrow (unity-toggle__checkmark) and sets the toggle's pickingMode to Ignore, so the item reads as a plain, non-collapsible header while the move-up/move-down/delete buttons stay clickable. This mirrors the IMGUI editor, which uses the same hasUIToShow predicate to choose foldout-vs-label. Jira: https://jira.unity3d.com/browse/UUM-144325
1 parent a8bc230 commit 7044c7e

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Fixed
1111

12+
- Fixed parameter-less processors and interactions (e.g. "Invert") in the Input Actions editor's Action Properties view showing an expandable foldout whose arrow animated on click but revealed no content; such items are now rendered as a plain, non-collapsible header [UUM-144325](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144325)
1213
- Fixed the Input Debugger window (Window > Analysis > Input Debugger) being resizable arbitrarily small until its toolbar and device/action/layout tree view were no longer usably visible; it now enforces a minimum window size [UUM-137119](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-137119)
1314
- Fixed the Action Maps list in the Input Actions editor losing keyboard focus after deleting a map, so that Delete, Duplicate, and arrow-key navigation kept working on the auto-selected replacement map without requiring an extra click [UUM-147152](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-147152)
1415

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/NameAndParametersListView.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,24 @@ public NameAndParametersListViewItem(VisualElement root, ParameterListView param
170170

171171
var foldout = container.Q<Foldout>("Foldout");
172172
foldout.text = parameterListView.name;
173-
parameterListView.OnDrawVisualElements(foldout);
174173

175-
foldout.Add(new IMGUIContainer(parameterListView.OnGUI));
174+
// A parameter-less processor/interaction (e.g. "Invert") has no content to reveal, so render it as
175+
// a plain, non-collapsible header rather than an empty foldout whose arrow animates but shows nothing.
176+
// Mirrors the IMGUI editor, which uses the same hasUIToShow predicate to choose foldout-vs-label.
177+
if (parameterListView.hasUIToShow)
178+
{
179+
parameterListView.OnDrawVisualElements(foldout);
180+
foldout.Add(new IMGUIContainer(parameterListView.OnGUI));
181+
}
182+
else
183+
{
184+
// Hide the expand arrow and disable picking on the header toggle; the move/delete buttons are
185+
// separate child elements and remain clickable.
186+
var checkmark = header.Q(className: "unity-toggle__checkmark");
187+
if (checkmark != null)
188+
checkmark.style.display = DisplayStyle.None;
189+
header.pickingMode = PickingMode.Ignore;
190+
}
176191
}
177192
}
178193
}

0 commit comments

Comments
 (0)