- Home /
Customizing GUI buttons
Hey fellas.Ive finished a simple End-of-level script with GUI options : restart,continue,main menu.And the problem is that it displays only 2 of them.And there are restart,continue on the same spot.How can i customize it to display everyone and make it bigger?Or even add a text above it like "You have just finished level",or putting it in the middle than just upper left corner? Thanks
Comment
Answer by geoman298 · Jul 30, 2012 at 09:37 PM
You should read this: http://docs.unity3d.com/Documentation/Components/gui-Basics.html
Also to change the style I would use a GUI style, here's the code:
//Java script:
var style : GUIStyle;
//then at the end of your GUI just put
, style);
it would look like this:
function OnGUI() {
GUI.Box (new Rect (0,0,100,50), "Test", style);
}
basically the same in C#