Hi all, as first, sorry for my bad english.
Don’t you know why GUI.Box inside of GUI.Button in my script does not appear?
I wanted it worked like if you clicked on the GUI.Button, then GUI.Button will disappear and GUI.Box will appear.
Here is the script:
static var TotalHP : int = 100;
static var TotalMB : int = 60;
static var TotalDamage : int = 10;
static var TotalDefence : int = 15;
function OnGUI() {
if(GUI.Button(Rect(Screen.width / 70, Screen.height / 1.15, 50, 50), "Stats")) {
GUI.Box(new Rect(Screen.width/35, Screen.height / 1.8, 300, 300), "HP: " + ManaAndHealth.curHP + " / " + TotalHP + "
" +
"MB: " + ManaAndHealth.curMB + " / " + TotalMB + "
" +
"Damage: " + TotalDamage + "
" +
"Defence: " + TotalDefence + "
");
}
}
Thank you for any response!