Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Input Control Attribute has no list support

Discussion in 'Input System' started by IroxGames, Jun 1, 2021.

  1. IroxGames

    IroxGames

    Joined:
    Feb 8, 2020
    Posts:
    16
    upload_2021-6-1_10-45-21.png

    As seen in the screenshot, the [InputControl] attribute has no list support. The Element name is the correct value currently saved but the dropdown displays the last value for all of the entries.
     
  2. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    What is your use case for using a control on array?
     
  3. IroxGames

    IroxGames

    Joined:
    Feb 8, 2020
    Posts:
    16
    We want to display the controls for actions in our game. This tool will automatically display the correct image for a specific control.
    Our Designers will select f.e. "Jump" as an action to display somewhere in the level. We then fetch the control for this Action and display the right button/stick or whatever it is

    To Setup this we have these controls mapped to images in a scriptable object.
     
  4. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    Ah, it's something we want to do as well but it's a bit ahead still. Please file a bug and we will have a look.

    Meanwhile I would suggest maybe create a list/dictionary where some property of control is used as a key, like control name, or name of control type (e.g. typeof(control).ToString() or something like that)