The problem I’m having right now is the order the showmenus are written. When I open menu1 and want to open menu2, it will hide the menu1 but it doesn’t work if I try to open menu1 from menu2. Wonder if anyone has seen this before. Even more, what would be the best solution/approach to this.
The reason I made two toggles is that I want them to be separated. When the application starts, the menus are hidden by default and you can only see two small toggle buttons; one top-left and the other top-right.
Only if I want to see it, then I’ll click on a toggle. You can basically open one menu at a time but if I want to be able to open one menu and open the other. I hope that makes sense.
var toggleBoolLeft : boolean = true;
var toggleBoolRight : boolean = false;
function OnGUI () {
toggleBoolLeft = GUILayout.Toggle (toggleBoolLeft, "Toggle") !toggleBoolRight;
toggleBoolRight = GUILayout.Toggle (toggleBoolRight, "Toggle") !toggleBoolLeft;
}
Effects : only one toggle can be active at the same time ; trying to activate the non active results in nothing achieved : neither the toggle is active nor the activated toggle is deactivated. Nice try anyway.
I had worked on this problem previously but I gave up at this time. I will think about it again a little harder…