Is a gameobject in the mainCamera view?

Is there a way to check if a gameobject is in the view of Camera.mainCamera?
A script attached to the gameobject would make the check to see if it is in view, otherwise destroy() itself.

Something efficient that can be done for 100 or so obects on a screen?

1 Answer

1

This tells you if your object is visible.

renderer.isVisible