how to make Seperate Menus in one scene.

how do you do disable you GUI Scripts so that you can for example have like a Main Menu then a button that goes to options.but when you click on the options button it hides the Main Menu GUI and displays the Options Menu GUI if the Code is in different scripts.Working in C# btw

Get the reference to the scripts then set ‘enabled’ parameter to ‘false’ to disable or ‘true’ to enable script. For example:

MainMenuScript mainMenu = GetComponent<MainMenuScript>();
OptionsMenu optionsMenu = GetComponent<OptionsMenuScript>();

mainMenu.enabled = false;
optionsMenu.enabled = true;

You can get the state of your Gui and use that stage to display the appropriate menu.

public enum GUIState{
   Start, Options, Leader
}

public class GUIClass:MonoBehaviour{
    GUIState state = GUIState.Start;
    void OnGUI(){
         switch(state){
             case GUIState.Menu:
                  Menu();
                  break;
             case GUIState.Options:
                  Options();
                  break;
             case GUIState.Leader:
                  Leader();
                  break;
         }
    }
    void Menu(){
        // Display what you need there
        // If options button is pressed change the state to options
        // If leader it goes to leader
    }
    void Options(){}
    void Leader(){}
}