Hi,
I need a script that Show a full screen texture2D when my player do a collision with a Box Collider that is Trigger and after two seconds i have to destroy it and I also have to do a script to put in a Box collider(Empty GameObject) and not in the player, if it’s possible.
I tried to do this:
var texture : Texture2D;
function OnTriggerEnter(col : Collider){
if(col.gameObject.name=="First Person Controller 1")
{
texture.enabled = true;
yield WaitForSeconds(3);
texture.enabled = false;
}
}
but it doesn’t work…
Thank’s for Help and SORRY FOR MY ENGLISH I’M ITALIAN