Skip to content

Commit 7ae7114

Browse files
Secticideekcohjamesmcgill
authored
FIX: Temporary fix to avoid exceptions being thrown by InputControlPathEditor editor inside UITK IMGUIContainer when deleting binding (#1789)
* Added try-catch block to stop exceptions from being thrown * Added Changelog entry --------- Co-authored-by: Håkan Sidenvall <[email protected]> Co-authored-by: James McGill <[email protected]>
1 parent 4c9f7fd commit 7ae7114

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ however, it has to be formatted properly to pass verification tests.
4343
- Fix for BindingSyntax `WithInteraction()` which was incorrectly using processors.
4444
- Fix for UITK Input Action Editor binding 'Listen' button which wasn't working in the case for Control Type 'Any'.
4545
- Fixed issue of visual elements being null during editing project-wide actions in project settings which prompted console errors.
46+
- Fixed case ISX-1436 (UI TK Input Action Asset Editor - Error deleting Bindings with DeleteKey on Windows).
4647
- Fixed issue with UI Toolkit based Input Action Editor not restoring it's selected items after Domain Reload.
4748

48-
4949
## [1.8.0-pre.1] - 2023-09-04
5050

5151
### Added

Packages/com.unity.inputsystem/InputSystem/Editor/ControlPicker/InputControlPathEditor.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,19 @@ public void OnGUI(Rect rect, GUIContent label = null, SerializedProperty propert
109109
editButtonRect.width = 20;
110110
editButtonRect.height = 15;
111111

112-
var path = serializedProperty.stringValue;
112+
var path = String.Empty;
113+
try
114+
{
115+
path = serializedProperty.stringValue;
116+
}
117+
catch
118+
{
119+
// This try-catch block is a temporary fix for ISX-1436
120+
// The plan is to convert InputControlPathEditor entirely to UITK and therefore this fix will
121+
// no longer be required.
122+
return;
123+
}
124+
113125
////TODO: this should be cached; generates needless GC churn
114126
var displayName = InputControlPath.ToHumanReadableString(path);
115127

0 commit comments

Comments
 (0)