Search Unity

Editor Bug: Cannot create Array of InputActions

Discussion in 'Input System' started by alpineboarder, Dec 27, 2019.

  1. alpineboarder

    alpineboarder

    Joined:
    Apr 11, 2013
    Posts:
    15
    I'm attempting to extend some of the InputSystem features for use in a plugin, but I noticed that whenever I serialize an array/list of InputActions, all sorts of weirdness happens.

    Instead of making new array elements, it just duplicates the view of Element 0. No new elements are created, just a window copy of what you see in Element 0. (There's also some off formatting that prevents dropdown arrows, etc). If I delete or alter anything, it happens everywhere.

    Is this a simple editor script fix?


     
    agamiof likes this.
  2. alpineboarder

    alpineboarder

    Joined:
    Apr 11, 2013
    Posts:
    15
    For now it seems the best workaround is avoiding arrays altogether with the new Input System, and using an InputActionMap if more than one action is needed for a single reference variable. I was hoping to use arrays to use numeric ID#s for actions, and add more options for each action, but no biggie :)
     
  3. SunnyChow

    SunnyChow

    Joined:
    Jun 6, 2013
    Posts:
    360
    i get simular problem when making a custom editor script. but instead of an array of InputAction, it's an array of
    serializable objects with an InputAction. hmm it's 2021 now
     
  4. InteractivaStudios

    InteractivaStudios

    Joined:
    Apr 28, 2013
    Posts:
    19
    Still happening... Unity 2020.3.12
     
  5. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Should be fixed in 1.1-pre.5.