So I was making a game (like a crude version of minecraft). It requires spawning cubes by tapping different keys. However, after adding 6 cubes the game becomes very laggy and is unplayable after adding just 8 or 9 cubes.
I can’t figure out why this is happening, considering that there is almost nothing else in the game except for adding these cubes.
I’ve uploaded a screenshot that shows the node tree for adding cubes (the different cubes being spawned are just different colours) and the shader editor shows the shading of the cubes (they are simple diffuse shaders, so it should not be having a tough time rendering the shading)
Any insights would be really helpful. Thanks