Show and hide object according to camera rotation.y position

I have a Main Camera rotating at 0,0,0 translate and I’m trying to make an object visible a few seconds after the camera gets it’s visible field.

I have tried gameObject.active and renderer.enabled with no sucess.

function Update() {
	
	if (Camera.main.transform.rotation.y <= 80 && Camera.main.transform.rotation.y >= 45) {
    	renderer.enabled = true;
    }
    else {
    	renderer.enabled = false;
    }
}



function Update() {
	
	if (Camera.main.transform.rotation.y <= 80 && Camera.main.transform.rotation.y >= 45) {
    	gameObject.active = true;
    }
    else {
    	gameObject.active = false;
    }
}

None of them work. The object don’t appears at camera.y 80 position.
The code is attached only to the game object I want to show and hide.
Thanks.

I’m new to Unity and don’t know how to use Frustum Planes. What I want to do is not so relevant, so I decided to use StartCoroutine, hiding and showing the object every few seconds.

The camera.rotation.y on panel is that value, but it’s indeed wrong. I have tested with a object attached to the camera, and the camera.y changes from > 0 and < 0, but never > 1.

Thanks for the answer. I’ll try Frustum Planes later anyway.