Find out if GameObject is in Field of View

I try to calculate if a GameObject is in Field of View of my Camera.

Edit: Becouse if not i want to disable the MeshRenderer of the GameObject.

Is there a buld in function i didnt find till now? Right now im using this code snippet which looks to work right. But im not sure.

Vector3 cameraRelative = _camTransform.InverseTransformPoint(gO.transform.position);
Vector3 screenPos = _cam.WorldToScreenPoint(gO.transform.position);

if (screenPos.x > 0 && screenPos.x < Screen.width && screenPos.y > 0 && screenPos.y < Screen.height && cameraRelative.z > 0)
// The object is in front of the camera
_inView = true;
// The object is behind the camera
_inView = false;

You can just use this:

bool visible = renderer.isVisible

There's an option to stop animations if the object is not in view