GUI Script

Hi,

I am currently designing a game where you have to survive a zombie apocolypse. I have so far made a main menu script, but i need to make a GUI Box Bigger how do i do this? The Script is below:

var newSkin : GUISkin;
var mapTexture : Texture2D;

function theMapMenu() {
//layout start
GUI.BeginGroup(Rect(Screen.width / 2 - 200, 50, 400, 300));

//boxes
GUI.Box(Rect(0, 50, 400, 300), “”);
GUI.Box(Rect(96, 20, 200, 200), “”);
GUI.Box(Rect(96, 222, 200, 20), “Select”);

//map preview/icon
GUI.Label(Rect(100, 20, 198, 198), mapTexture);

//buttons
if(GUI.Button(Rect(205, 250, 180, 40), “load Game”)) {
Application.LoadLevel(1);
}
if(GUI.Button(Rect(15, 250, 180, 40), “New Game”)) {
Application.LoadLevel(1);
}
if(GUI.Button(Rect(75, 285, 180, 40), “go back”)) {
var script = GetComponent(“MainMenuScript”);
script.enabled = true;
var script2 = GetComponent(“MapMenuScript”);
script2.enabled = false;
}
//layout end
GUI.EndGroup();
}

function OnGUI () {
//load GUI skin
GUI.skin = newSkin;

//execute theMapMenu function
theMapMenu();
}

the line GUI.Box(Rect(0, 50, 400, 300), “”); is the box. Please Help!!! :):lol:

The last 2 numbers on Rect deal with Width Height. You should create 2 new variables for Width Height so that you can tweak them till they’re perfect whilst in GameMode.

Example :

var Width = 400;
var Height = 300;

function OnGUI(){
GUI.Box(0,50,Width,Height),"");
}