Make GUI.Button create another GUI.Button

I am trying to make a simple, virtual pet game, but I am having issues with GUI.Buttons.

I would like to have:

 GUI.Button(blah blah blah) //Menu button
           GUI.Button(more blahs) //Feed button.

Now, I can get both buttons to work by themselves, but when I put the second inside the first it doesn’t work. I also tried a version with Instantiate variables to instantiate gui.button but it also didn’t work.

Any help with this would be greatly appreciated.

It’s immediate mode. The first GUI.Button() will only be true for the instant that the button is clicked. Keep track of this click to show the second button.

bool showSecondButton = false;

void OnGUI() {
    if (GUI.Button(blah blah blah)) {
        showSecondButton = true; // (or = !showSecondButton to toggle)
    }
    if (showSecondButton) {
        GUI.Button(more blahs);
    }
}

This helps a lot, thank you very much.

Happy to help!