GUI to other GUIs

I want to make a GUI and this has three functions:
· If you press this GUI, new GUIs will appear.
· If you press it again, these new GUIs disappear.
Please help me i’m a beginner :slight_smile:

Use boolean values to know when you pressed a key/button that, when true, display a GUI.Window. Should look something like this

public bool showWindow = false;

void OnGUI(){
    if(showWindow)
        GUI.Window(0,Rect(5,5,500,500),WindowFunction,"My Window");
}

void Update(){
    if(Input.GetButtonDown("i"))
        showWindow = !showWindow;
}

void MyWindow(){
    GUI.Button(Rect(5,5,50,50),"Blah");
}

This will open a window when you press the “i” key this can easily be modified so that when you click a button it opens your window…

Unespected token bool (line 1)