Search Unity

PropertyField of an array to Reorderable List

Discussion in 'UI Toolkit' started by Dunskat, Feb 2, 2021.

  1. Dunskat

    Dunskat

    Joined:
    Oct 17, 2017
    Posts:
    11
    I'm trying to make a VisualElement (editor only) property item of an array.
    In Unity 2020.2 all arrays are shown as reorderable lists, which is wonderful, and I wonder if I can also utilize it in Visual Elements, not just IMGUI.

    I noticed a current bug with the IMGUI container is that it's not reliably passing the foldable of an array, so instead I'm using the regular PropertyField, and binding it to the array.

    Thanks!
     
  2. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    377
  3. Dunskat

    Dunskat

    Joined:
    Oct 17, 2017
    Posts:
    11
    Thank you, that’s very helpful.