OnTriggerEnter GUI

I have been trying to use the function OnTriggerEnter(other : Collider) { }

to make it so when you run into the box collider a text GUI will pop up, than after a few seconds go away, I have tried but failed, I need help please

If you want the GUI to appear when you hit the collider you could just have a boolean (say bShowGUI) and set it to false initially.And in you OnTriggerEnter function you could set that to true.Your OnGUI function will now render the GUI only when the bool returns true.

Eg:(This is rough untested code in C#)

private bool bShowGUI = false;

void OnTriggerEnter(Collider collider) { bShowGUI = true; }

void OnGUI() { if(bShowGUI) //DrawButton/Label etc


Hope this helps