So it there a way that I can use an “if” statement in a GUI function. Because I tried to and it errors.
var powerjumpG : Texture2D;
powerjumpTF = false;
function Update ()
{
}
function OnGUI ()
{
if(powerjumpTF)
{
GUI.Box (Rect (965, 10, 50, 50), powerjumpG);
}
}
Basically I wan’t to hide that GUI.box until powerjumpTF is true. Is there another way to do this?