- Home /
Question by
Adam2Marsh · Jul 07, 2015 at 03:57 PM ·
editorcustom-inspectorcustom-editor
Custom Inspector Horiztonal Vector2 and Button Spacing
Evening All,
Having an issue trying to understand why there is suck a large gap between a Vector2 Field and Button. There wrapped in the EditorGUILayout.BeginHorizontal (); and EditorGUILayout.EndHorizontal (); but I've been unable to shorten that gao.
Here's the code:
EditorGUILayout.BeginHorizontal ();
EditorGUIUtility.labelWidth = 90;
aniDetList.animationDetails [PopUpIndex].Waypoints [i] = EditorGUILayout.Vector2Field ("Waypoint " + i, aniDetList.animationDetails [PopUpIndex].Waypoints [i], GUILayout.Width (400));
if (GUILayout.Button ("X", GUILayout.Width (20))) {
Debug.Log ("Removing Waypoint at Position: " + i);
DeleteWaypoint (i);
}
EditorGUILayout.EndHorizontal ();
And Picture:
Can anyone off some advice on how to shorten/remove that gap?
Thanks in Advance.
screen-shot-2015-07-06-at-231627.png
(15.1 kB)
Comment