how can i know the whole gameobject is being seen in camera view?

i want to adjust the distance of my camera from the game object that the whole game object can be seen on camera view. no more things. only the game object.

Check if the angle (camera.forward, [camera,GameObject]) is > or < to half the field of view. To be thourough, you might need to do that for the eight points of the bounding box.