I am trying to click on a button, make the button disappear, then show a label in a different location. I can get the label to show up but I can't make the button disappear without making the label disappear as well. I'm using c# and new to scripting so any help is greatly appreciated!
private bool andrewGreen_Drafted = true;
private bool player_Drafted = false;
void OnGUI(){
if(andrewGreen_Drafted){
if(GUI.Button(new Rect(50,50,100,30),Andrew_Green)){
player_Drafted = true;
}
if(player_Drafted){
ShowLabel();
}
}
}
void ShowLabel(){
GUI.Label(new Rect(Screen.width/2,Screen.height/2,100,30),Andrew_Green);
}
↧