GUI.Box and Camera Movement

Hello, below is my piece of code from different objects put together for the ease of understanding my problem. I have a GUI.Button that appears when certain gameobjects are selected and the camera updates its transform.position according to the transform.position of the gameobject selected. When the GUI.Button is clicked the camera updates its transform.position to an alltogether different position and there needs to be a GUI.Box that is 2/3 of the screen width and full screen height. The camera updates its position correctly when the GUI.Button is pressed but the GUI.Box does not appear on the screen.

var camera:gameobject;
camera=GameObject.Find("Main Camera");

function OnGUI()
{
if (GUI.Button (Rect(Screen.width/2-140,Screen.height-40,50,40),"Build"))
{
camera.transform.position=Vector3(0,9,-28);
camera.transform.eulerAngles=Vector3(0,0,0);
GUI.Box(Rect(0,0,Screen.width*2/3,Screen.height),"Build Options");
}
}

The GUI.Button() statement will only be true for a single frame, so you GUI.Box is being displayed…for a single frame. I’m not sure how you want to handle the logic, but you can do something like:

function OnGUI()
{
    if (GUI.Button (Rect(Screen.width/2-140,Screen.height-40,50,40),"Build"))
    {
        camera.transform.position=Vector3(0,9,-28);
        camera.transform.eulerAngles=Vector3(0,0,0);
        buildOptions = true;
    }
    if (buildOptions)
        GUI.Box(Rect(0,0,Screen.width*2/3,Screen.height),"Build Options");
}

Where bildOptions is declared at the top of the file with an initial value of false.