Reserve layout space

Hi,

I’m working a lot with EditorGUI to make some generic tools that could be used in different EditorWindow. And sometimes, it’s mixed with EditorGUILayout code for the simplicity of it.
So I’m looking for the best way to reserve layout space on my EditorGUI tool.

For now, I’m using GUILayoutUtility.GetRect(tool.width, tool.height) to reserve the whole space but it’s not accurate. The rect is not the size of my tool and I quite understood that this function is not supposed to be used like that. I didn’t found another solution.

Seems that if I start my GUI with EditorGUILayout.BeginVertical(GUILayout.Width(tool.width)) and then I finish by GUILayoutUtility.GetRect(0, tool.height). the layout space is accurate.
But I’m not sure that’s the best practice to do that.