I work on horror fps game and i want to destroy enemy when i see it. In other world destroy the enemy when it is appear in camera screen?
Try OnBecameVisible on the object you want destroyed. This function is called when the attached object becomes visible by the camera. Note that this could destroy before you ever truly see the object as it calls once it’s within the camera’s view.
Thank a lot.
But this function was destroyed enemy when it was not in camera view.