its annoying me that unity wont let me call a GUI Button function in an OnTriggerEnter function after the if statement. I want to make instructions come up when you enter a trigger, but unity tells me that the I can only call GUI functions from inside OnGUI().
any ideas around this?
heres the script so far:
var tips1 : GUIText;
var tipsPREFAB : GUIText;
function OnTriggerEnter (player : Collider)
{
if(player.gameObject.name == "BlueMan")
{
OnGUI();
}
}
function OnGUI ()
{
(GUI.Button (Rect(10, 300, 100, 80), "press T for help "));
}