Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What is the best way to map a "Select" action for various controllers?

Discussion in 'Input System' started by awardell, Nov 2, 2021.

  1. awardell

    awardell

    Joined:
    Feb 5, 2014
    Posts:
    71
    I have an action for menus named "Select" that you can see here:
    upload_2021-11-2_12-47-14.png

    As you can see, it uses the customary "affirmative" buttons for each type of controller. I would like to be able to fallback to "Button South" if the player is using a non-standard controller, but I can't see how to do that without conflicting with these controller-specific actions I already have, particularly A on the Switch Pro Controller. What is the best way to go about handling this? My apologies if sort of thing is already in the docs somewhere that I missed.
     
  2. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    Hi, you probably want to give a try to control schemes, that way you can create Xbox control scheme, PS4 control scheme, Switch control scheme and then Gamepad control scheme. Specialized schemes will only be used if respective device is used, and for everything else a generic scheme will be used.
     
  3. awardell

    awardell

    Joined:
    Feb 5, 2014
    Posts:
    71