- Home /
changing the default position of buttons
Hi! can you please tell me where I can change the default position of GUILayout window's buttons? every content I add to my GUILayout window will appear in succeeding order. Is there any way I could change this style using GUIStyle or whatever?
thanks in advance
Answer by Peter G · Jul 31, 2011 at 06:34 PM
I'm not sure what you mean. That's what GUILayout is designed for. Automatically setting up the spacing for you. If you want more control there are a few things that you can do:
- use a GUILayou.BeginArea() to reposition the collection of GUI windows. For example if you need it to be aligned to the center of the screen rather than the left edge. 
- You can pass option parameters to the function to control how far it can expand or shrink. 
- And if you need more control than that, I suggest that you use the manual GUI functions. These give you more control and actually have better performance because Unity doesn't have to do as many calculations for placement. 
EDIT: Ok, now I get what you're asking. Look at GUILayout.Space
So you're saying that if I want more spacing between my buttons I have to use simple GUI buttons,because GUILayout windows and buttons are fixed and will not do?
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                