i have a GUI which shows characters health i want to remove this GUI after my Character died how can i do this this is my scripts;
#pragma strict
var healthBar: PlayerStatsV2;
function OnGUI()
{
if (healthBar.damaged==true)
{
GUI.backgroundColor = Color.red;
}
else
{
GUI.backgroundColor = Color.green;
}
GUI.Button(Rect(20, 20, healthBar.Health, 20),"health");
}
↧