I need to make a menu. With the script I have, if a certain level is unlocked, the GUI button turns red, indicating to the player that they can now play that level. I know to make a button work, the code would be:
if (GUI.Button (Rect (20,40,80,20), "Level 1")) {
Application.LoadLevel (1);
But my GUI has this code:
if(renderMenu && houseNineUnlocked && !explore){
GUI.backgroundColor = Color.red;
GUI.contentColor = Color.white;
GUI.Button(Rect(700,720,500,50), ("House Nine"));
As you can see, there are multiple components to this, and a set of standards has to be met for the GUI to be rendered, and it has specifics too, like background color, and content color. I can’t put that into an “if” statement, so how would I do it?
(The only other way I can think of is using textures, but since the textures aren’t being worked on at the moment, that’s not an option.)