Search Unity

Bug Input Maps don't filter out input events based on device

Discussion in 'Input System' started by Deleted User, Jun 15, 2020.

  1. Deleted User

    Deleted User

    Guest

    I have two inputs schemes;

    Scheme A: requires Oculus Rift controller
    Scheme B: requires HTC Vive controller

    Scheme A (erroneously) contains an action map for the HTC Vive trigger button. This action fires even though the map "requires" a rift.

    If I create a new Scheme, and set the new map to require oculus, I cannot add an action for the vive -- but if I create the action first then change the scheme requirements, the vive value sticks.

    Is this a bug, or am I doing something wrong?

    (I'm not using the PlayerInput class or anything, just using the .performed callback on the action. Otherwise no custom configs.)
     
    Last edited by a moderator: Jun 15, 2020
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    ATM only PlayerInput automatically sets up "device restrictions". When using InputActionAssets directly or using the "Generate C# Class" workflow, there is currently no automatic support for control schemes. Adding this to "Generate C# Class" is high on the list. Has tripped up quite a few people and really isn't very obvious.

    To manually script this, check this post.