Search Unity

how to set space GUI toolbar ?

Discussion in 'Immediate Mode GUI (IMGUI)' started by zilo, May 1, 2011.

  1. zilo

    zilo

    Joined:
    May 1, 2011
    Posts:
    3
    how i can do it ?
    (sorry my english very bad)

    $Untitled.png
     
  2. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Code (csharp):
    1.  
    2. GUILayout.BeginHorizontal();
    3.  
    4. GUILayout.Button("button 1");
    5. GUILayout.FlexibleSpace();
    6. GUILayout.Button("button 2");
    7.  
    8. GUILayout.EndHorizontal();
    9.  
    Or GUILayout.Space(# of pixels) if you want to define the width exactly.