Ok, heres the question. I have assigned a lens flare to my rocket, which is shot by a rocket launcher. After the rocket colledes, the lens flare seems o be stuck there forever. How do i make it dissapear after some time?
var lensFlareBehaviour:Behaviour;
function MissileExplode(){
//code for missile and stuff
Destroy(lensFlareBehaviour);//destroy the lens flare
Destroy(gameObject);//destroy the missile
}
Just assign the lens flare behaviour to the lensFlareBehaviour variable through the inspector view