Quantcast
Channel: Latest Questions by Garndaddy
Viewing all articles
Browse latest Browse all 8

Make button disappear, but show label.

$
0
0
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); }

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>