How to count objects in cameraview?

Is it possible to count objects that are seen in the cameraview?

Thank you!

Take a look at Renderer.IsVisible

Loop through all the GameObjects in your scene, and check if they are visible, and add them to a counter if they are.

A more complicated, although possibly more efficient way would be to store a list of GameObjects, and add or remove them from this list as they fire the OnBecameVisible and OnBecameInvisible events.

Yes, it is possible, but extremely difficult to do in a pixel sense. I doubt you mean any pixel being visible. Maybe you also don’t care if objects are hidden behind other objects.