Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Feedback UX: Improve array visualization in Inspector

Discussion in 'Editor Workflows' started by Peter77, Oct 6, 2018.

  1. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,109
    I was about to post this in the New Editor Theme thread, but then thought perhaps it's not really related, so I created a separate thread instead.

    I often find myself expanding arrays to see how many elements are contained. For me, an UX improvement would be if I can see how many elements an array contains, without having to expand that array first.

    This is how an array is displayed in "Unity 2019 UI Preview" today. It does not give any information about the number of elements.

    screenshot_1.png


    Here is an idea how to visualize the element count of an array, without having it to expand first.

    screenshot_2.png

    screenshot_3.png
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,410
    nice, unless it then requires ui to be refreshed all the time, and constantly query array size too?

    i've already seen that unity almost dies if you have a huge array, and even if its hidden with [HideInInspector]..
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,283
    The array size is serialized in a single field, so (theoretically) the contents of the array shouldn't be relevant to draw speed.

    This would be really easy to implement ourselves as a custom attribute drawer, if we were allowed to specify that attributes should target arrays instead of the elements in the arrays. That's always been a huge drawback of editor scripting.
     
  4. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,109
    Indeed, it's a huge bummer that this isn't supported.