Check if object is seen by 3D camera

How do I…

I want to pick all object that are in 3D camera’s view

What is the expected result

What is the actual result

I have no idea how to do this… I could maybe use raycasts or something but idk

Related screenshots

something like this: