- Home /
How to increase space between two things with GUILayout.BeginHorizontal C#
Can you increase the space between two thing in GUIlayout? I'm using a GUIlayout.BeginHorizontal function and these buttons are way to close to each other than I would like.
Void OnGUI(){
GUIlayout.BeginHorizontal();
GUILayout.Button("Button1", GUILayout.Width(75), GUILayout.Height(25));
GUILayout.Button("Button2", GUILayout.Width(75), GUILayout.Height(25));
}
Comment
Best Answer
Answer by Bunny83 · Sep 24, 2012 at 02:11 AM
GUILayout.Space? ;)
Note: This is not a GUILayoutOption, it's another seperate element:
GUILayout.Button("Button1", GUILayout.Width(75), GUILayout.Height(25));
GUILayout.Space(10);
GUILayout.Button("Button2", GUILayout.Width(75), GUILayout.Height(25));
I had no I idea that existed. Thanks for helping me out.