Should I do Occlusion Culling manually through script?

Hello,

In my project I have shaders such as sometimes a lot of objects are not visible, though are on camera.
I’ve seen in the performance analyzer that the meshes were still rendered counting for a lot of additional useless vertices (almost double).

Since I can accurately predict when they are visible and when they’re not, I think I have to cull the meshes “manually” through script. Is that the right approach?

meshRenderer.active = meshVisible

Did I miss something?

Yes, manual culling work nice.

meshRenderer.forceRenderingOff = !meshVisible

Are there other benefits in using forceRenderingOff appart from the separation of responsibility? (like not displaying renderers that were set to off in the inspector).

I will use your property to avoid this kind of mistake but I’m wondering if there are other side effects.

Given Unity documentation, it seems this property was designed specifically for this purpose so that is perfect!