Vertical Layout in PropertyDrawer

I apologize if this has been discussed elsewhere. I’ve just had difficulty finding good information.

Basically, what I have is a custom PropertyDrawer that has multiple rows, and within those rows can have multiple items in each row. I am able to build this, but running into issues with the following:
-When my custom PropertyDrawer is part of an array of elements, the drawers overlap with one another.
-I fixed this by overriding the GetPropertyHeight to account for all of my rows.
-However, this is causing some properties (like float inputs) to span the entire height, instead of just the row.

Is it possible to do multiple row set ups with PropertyDrawer when used in an array of elements? Anyone have any advice on how to set that up if it is possible?

You’ll need to code this manually. GetPropertyHeight should return the minimum height that encompasses all controls in your drawer. Then, in OnGUI you split the rectangle up into smaller ones and draw the controls.

1 Like