Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feature Request Easy way to create ArrayPropertyDrawers

Discussion in 'Editor & General Support' started by OBiwer, Dec 6, 2022.

  1. OBiwer

    OBiwer

    Joined:
    Aug 2, 2022
    Posts:
    61
    There is currently no easy way to create a custom array or list property drawer.

    Creating e.g. pagination instead of the standard list requires to either wrap your array into another class/struct and create a custom drawer there - which makes it more annoying to work with the list in code OR to create a custom editor for your component that uses this type.

    There are assets like Tri-Inspector that have the option to create a tabular list, but the way they do it is to create a custom editor for all MonoBehaviour and register it as fallback.

    Would it really be so hard to add a "CustomArrayPropertyDrawer" attribute and an "ArrayPropertyDrawer" base class to override array rendering?

    There are posts dating back to 2014 where people try to do stuff like this [e.g. here]. It's time to get first party support for that!