hi, I’m trying to make a box collider trigger that will show an image. I put this code:
function Update () {
Start();
}
var image:GUITexture;
var canShow = false;
function Start() {
image.enabled = false;
}
function OnTriggerEnter(other : Collider) {
var g_infotext = gameObject.Find(“g_infotext”);
canShow = true;
image.enable = true;
if (other.gameObject.CompareTag ("Player") && !canShow) {
image.enable = true;
}
}
function OnTriggerExit(otherCollider : Collider) {
image.enable = false;
canShow = false;
}
into it, and when I pass it can check the canShow, but no GUITexture appears... What's wrong with this? Can anyone help?