Code (csharp): function OnGUI(){ if( GUILayout.Button("hello") ) //Stuff if( GUILayout.Button("hello") ) //Stuff if( GUILayout.Button("hello") ) //Stuff if( GUILayout.Button("hello") ) //Stuff if( GUILayout.Button("hello") ) //Stuff }
http://forum.unity3d.com/threads/113438-Centering-GUI?p=1150803&viewfull=1#post1150803 http://forum.unity3d.com/threads/16...ed-gui-issue?p=1152661&viewfull=1#post1152661
or you can just use the GUIButton 5 times. Code (csharp): if (GUI.Button(Rect(10,10,50,50),btnTexture)) Debug.Log("Clicked the button with an image"); if (GUI.Button(Rect(10,70,50,30),"Click")) Debug.Log("Clicked the button with text");
In an array how? Why do you need them in an array? If it is just like push button 1 arr[0] = false, etc just put the part of the array in the if argument.