Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Feature Request Exclude devices for scheme

Discussion in 'Input System' started by Jan-Eylander, Jan 9, 2023.

  1. Jan-Eylander

    Jan-Eylander

    Joined:
    Nov 17, 2017
    Posts:
    16
    Currently we have a required and an optional field for the Control Schemes.
    But it would also be great to have an exlude list.

    So for example when I would like all Controllers to have a specific action maped on the south key but for one specific controller I want the south key to do something else currently I would need to include all Controllers in one scheme instead of just excluding the specific one. Also this brings up the issue if some new Controller Types come up these will not be supported at all since an update would be required to implement the new controller.

    (For the default controllers this might be no big deal but for example due to the format of the switch handheld you grap the controller differently and due to this you might consider changing the inputs for this controller specificly)

    Example:
    Scheme AllControllers has the <Gamepad>/buttonSouth Mapped to DoX
    Scheme SwitchController has the <NPad>/buttonEast Mapped to DoX

    Now the <NPad>/buttonEast and <NPad>/buttonSouth is Mapped to DoX since the NPad is also marked as a Gamepad.
     
    Last edited: Jan 9, 2023
  2. Jan-Eylander

    Jan-Eylander

    Joined:
    Nov 17, 2017
    Posts:
    16
    Ok I tought about it a little longer and I think an better aproch would be to have an exclude list at the BindingsProperties.
    So whenever there are multiples grouped under a base selection path there should be some kind of excluder.

    (An example on how I think this might look like)
     

    Attached Files:

  3. rdjadu

    rdjadu

    Joined:
    May 9, 2022
    Posts:
    118
    If I understand what you're trying to do correctly (not sure), then no, you actually wouldn't have to do that.

    It's totally fine to have one control scheme for Gamepads and one for a *specific* kind of gamepad. If your player has the specific one, it will take the latter. For all other gamepads, it will use the former.

    To not have to duplicate a bunch of bindings, you'd just toggle them as needed in the "Use in control scheme" matrix. And then only the differences would actually be, well, different between the two schemes.
     
    Jan-Eylander likes this.
  4. Jan-Eylander

    Jan-Eylander

    Joined:
    Nov 17, 2017
    Posts:
    16
    Sorry for the late reply but exactly thats whats not happening. At least from my understanding. In the input debugger I see that there are two inputs maped for the controller one time the overarching gamepad input map and the direct pad i defined. (Or this is just an error in the version i got) But since the design time has changed its mind i dont need to bother right now. I will catch up on this if I have to.

    Thanks so far anyways