GUILayout, is there a way to bunch horizontal elements together?

I am trying to make selectable words that are buttons in between sentences that are labels

when i put them in guilayout it spaces them accross the entire guilayout like it’s supposed to and puts big gaps in my sentences, any way around this?


GUILayout.BeginArea (Rect (Screen.height*.05, Screen.height*.15, Screen.height, Screen.height*.80));
		GUILayout.BeginHorizontal ();
		GUILayout.Label("This is a ");
		GUILayout.Button ("test word");
		GUILayout.Label("that you might want to ");
		GUILayout.Button ("press.");
		GUILayout.EndHorizontal ();
		GUILayout.EndArea ();

The easy solution is to stick GUILayout.FlexibleSpace() at the end:


The slightly less easy solution is to create custom GUIStyle’s where GUIStyle.stretchWidth is set to false: