How to detect when object it is on-screen? bge
This is easy enough from python by casting a ray from the camera to the object:

import bge
own = bge.logic.getCurrentController().owner
cam = own.scene.active_camera
own_screen_pos = cam.getScreenPosition(own)
result = cam.getScreenRay(*own_screen_pos, 100)
if result == own:
    print("The object can be seen")
else:
    print("The object cannot be seen")


Be aware this will only check the centerpoint of the object rather than the edges.