Draw on Multiple Lines with EditorGUI

I am using property drawers to expose some custom classes in the Unity inspector.

So far so good, except I have a class which I would like to draw over multiple lines. I understand that Unity doesn't allow us to use EditorGUILayout calls within property drawers so I've been trying to make this draw correctly using EditorGUI functions instead.

The problem I'm having is that I can't seem to figure out drawing on multiple lines. If I change the Y position or height of the rect for the EditorGUI call then the element will move but the inspector doesn't resize to accommodate this. If I do nothing then the elements overlap.

What I want:

What I have:

If anybody can give me some pointers on how to create a property drawer that extends over multiple lines like in the example above, I would be very greatful!

Thanks in advance!

Ok so I managed to find a solution hiding in the documentation.

Basically, in order to draw on multiple lines with EditorGUI() you have to use the GUILayoutUtility.GetRect() function. It reserves space on the inspector for your element and also returns the rect you can use to draw it.

Here's an example of usage:

Rect rect = GUILayoutUtility.GetRect(GUIContent.none, EditorStyles.objectField);
EditorGUI.PropertyField(rect, location, GUIContent.none);

Hope this clears up any issues for others!