How to prevent any invisible object from being rendered?
Hey, i'm practicing unity by making a minecraft clone. Each block is just a textured cube. My question is, how can i prevent invisible blocks (each block is a gameobject) (every block that is out of sight or behind other blocks) from being rendered? meshRenderer.isVisible and OnBecameInvisible do not work...
i want to achieve that, if i have a 10x10x10 block of blocks, that only ~600 of them are rendered. the ~600 that are actually visible. All the blocks on the inside should not be rendered.
Thank you for your help in advance.
Your answer

Follow this Question
Related Questions
Control and Render massive sprites in a single Gameobject 0 Answers
Frame rate stays at 10 fps even when all meshes changed to cubes 0 Answers
Should occlusion culling be used in multiplayer games? 0 Answers
Game gets slower for certain resolutions in Unity Editor. What could be possible fix? 0 Answers
Bad Performance URP 0 Answers