Hello !
i wanna make a GUI Texture appear when i get into a trigger, i have already made it someday, now i wanna make it work again in my project but it doesn’t work, here is the script applied to the object that the player needs to collect, the start method and the OnTriggerEntry work perfectly, the problem is with th OnTriggerExit method, the GUI Texture doesn’t want to disappear ! what should i do , please i have only one day to fix this problem ! HELP !
#pragma strict
var CUTE : GUITexture;
function start()
{
CUTE.enabled = false;
}
function OnTriggerEnter(otherObj: Collider){
if (otherObj.tag == "Player")
{
Debug.Log("hello");
CUTE.enabled = true;
}
}
function OnTriggerExit(otherObj: Collider){
if (otherObj.tag == "Player")
{
Debug.Log("hello");
CUTE.enabled = false;
}
}