FIX: remove check that triggered NotImplementedException for Usage bindings (ISXB-373) #1625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If a Usage (e.g. Submit) was bound then an NotImplemented exception could occur because it hit a case that wasn't implemented yet.
InputControlPath::ToHumanReadableString()
to trigger the failure).control
will beKey/Enter
andcontrol.device
will beKeyboard
.There is a
TODO: support scavenging a subhierarchy for usages
there, so my first instinct was to implement the missing case, however, at least in this case I couldn't see why we would want to search fromKey/Enter
downwards in the subhierarchy. And I couldn't come up with another use-case. I'm also unsure how this could be implemented if we wanted to (without moving usages out to be on per control basis which seems redundant?).Perhaps I haven't understood the intention of the comment correctly, so happy to hear if someone knows better?
Even if we do have future plans for this, I think we should still remove this Exception today as the reproduction was extremely easy to trigger and I don't see any issue with looking at the root device for Usages in the meantime.
Changes made
Checklist
Before review:
Changed
,Fixed
,Added
sections.([case %number%](https://issuetracker.unity3d.com/issues/...))
.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.