InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

[UI] "dpad" not listed for action of type Vector2

Open Rene-Damm opened this issue 7 years ago • 4 comments

  1. Create action
  2. Set type to "Vector2"
  3. Create binding
  4. Filter for dpad in the control picker

Dpad is a Vector2 and should be included but is not listed.

Rene-Damm avatar Jan 04 '19 00:01 Rene-Damm

Are you still seeing this? I can't repro with 0.1.2 on 2018.3. Looks like its working now. untitled

douglas-piconi avatar Jan 22 '19 20:01 douglas-piconi

@douglas-piconi You'll have to use the asset editor to see this one, I think. The problem is only there if you set the type of an action which I think you can't do in the embedded UI. Once you set the type, the control picker starts filtering controls. Looks like it's incorrectly filtering out dpad when the type is Vector2.

Rene-Damm avatar Jan 23 '19 04:01 Rene-Damm

Ah, taking a second look, found the problem. LayoutMatchesExpectedControlLayoutFilter checks inheritance on the control type, not on the value type. So DpadControl would have to be a Vector2Control for this to work. Will take another look tomorrow to see which way this should go. Technically, DpadControl should be a Vector2Control. Think the only reason it's not is that it will get an X and a Y control, too, and currently the state system isn't easily coaxed into synthesizing that axis from two buttons.

Rene-Damm avatar Jan 23 '19 04:01 Rene-Damm

Verified fix on 2019.1.0b9 with Develop (af5d4c1)

JiaUnity avatar Mar 28 '19 23:03 JiaUnity