I need an object to appear as player walks into a trigger. So basicly I am asking for just one line of a script to make an object materialize in front of a player and then to be destroyed. Here is a reference to what I want to achieve.
public var AnObject : GameObject;
function OnTriggerEnter(other : Collider){
if(other.gameObject.name == "Player"){
------------------------????
yield WaitForSeconds(3);
GameObject.Destroy(AnObject);
}
}