Hello all,
I’m trying to get more gui elements to show up when I click a button in a menu for nested menus. I had assumed the following code would work:
void OnGUI(){
if(GUI.Button(new Rect(0,0,100,100),"Test Button")){
GUI.Box(new Rect(150,150,40,100), "The Button is Clicked");
}
}
but it does not work as expected. The Gui box never shows up. If I move the Gui box code outside the conditional, it shows up as expected. I’m curious how I’d get functionality like this to work.
Thanks much