I’m working on a custom editor window and I have a Bounds and a Vector3. If I use the BoundsField and Vector3Field for the values, they don’t line up nicely at all. So what I’m trying to do is create my own UI that will mimic the bounds field (one row of it, anyway) for my three float values. However I can’t seem to figure out the magic thing to get the UI to match it. Here’s what I have so far:
GUILayout.Label("Cube Settings");
bounds = EditorGUILayout.BoundsField(bounds);
GUILayout.BeginHorizontal();
GUILayout.Label(" UV:");
uvTiling.x = EditorGUILayout.FloatField("X", uvTiling.x);
uvTiling.y = EditorGUILayout.FloatField("Y", uvTiling.y);
uvTiling.z = EditorGUILayout.FloatField("Z", uvTiling.z);
GUILayout.EndHorizontal();
But that doesn’t end up looking right at all. I’m pretty sure I’m going to need to use some of the styling options, but I was hoping: has anyone already done the work of figuring out how to match this UI to save me some time? Any pointers?