Low FPS with lots of cubes loaded.

I have a button that creates a floor made of cubes after inputting values (eg. I’ll fill both fields with 200 and press the draw button, spawning 200x200 cubes that acts as the floor). I made my own occlusion culling that sets active true on the object and it’s components in front of the player at a certain distance (sets active to false, collider to false, renderer and meshrenderer to false if it’s behind the player or past the set distance). The problem is, I still get low FPS, usually under 10, when setting up 200x200 cubes. I’ve tried generating my own meshes and shapes (triangle shapes) and the outcome is the same. Am I missing something? Is there something more I can do? I’ve tried everything I can think of. I’m not looking to download anything from the asset store or any outside scripts to do things for me, especially since I’ve done most of it myself, aside from fixing this issue.

Edit - I made my own cube mesh and instantiated then the same way and I’m still getting low FPS. I’ve googled and I can’t find a solution to the lag, but I’ve seen people make Minecraft clones with no lag. What do I need to do to increase the FPS when I place 20x20 or more cubes?

Thanks in advance!

Instead of rendering every cube individually, you need to combine the cubes into chunks. Rendering 1 chunk that contains 100 cubes will be faster than rendering 100 cubes separately. Try profiling and see where the bottlenecks occur.

Well, this didn’t really help. I suppose it’s my fault for asking online though. Thanks anyway.