Rendered in view

Im sure this is an old question, but its breaking my mind. I have some VERY simple code thats not doing what i expect, having seen it asked in a similar question. This is all the code thats running:

Renderer renderer;
void Start()
{
renderer = GetComponent<Renderer>;
}
void Update()
{
If(renderer.isVisible){
Debug.Log("Visible!");
}else{
Debug.Log("Not Visible!")
}
}

No shadows, lighting, etc active on this renderer. I start the scene, i get two not visibles, then spammed visible, which i expect. I grab the object and move it out of camera view, and it continues spamming visible. I expect it to say not visible, from experience (which oddly just broke as well, i had bullets going back to their pool when using this and they left view, now theyre back to not even getting their velocity), it should be saying not visible. Wtf?

Note that the object is considered visible when it needs to be rendered in the Scene. For example, it might not actually be visible by any camera but still need to be rendered for shadows. When running in the editor, the Scene view cameras will also cause this value to be true.

I’ve never really understood the appropriate contexts to use this variable because of this, outside of a very conservative cull.

Well hell, it seemed to work before with the bullets.

Ok, any KISS ideas for this, or do i need to have something track xz coordinates to see if its left camera?

Maybe a stupid collider off screen to do it. Ugh, i was hoping for an easy “not in view” answer lol

If you don’t need to make it super accurate and instead just accurate enough, you could just create a rectangular pyramid shaped trigger collider with a depth of 1 unit and an edge length at the base of 1 unit, give it its own layer to make sure nothing else tests against it, then adjust its size, scale, and rotation based on the camera’s view frustum. If the objects you’re testing against have colliders, it’s simply a matter of OnTriggerEnter/OnTriggerStay/OnTriggerExit.

Obvious caveats are that you may not have colliders that 100% match your mesh and you might have to deal with objects of a certain velocity not registering if they’re only visible for a few frames, but I’ve used this in a pinch for when I just need a “good enough” result.