So I am making a game, which you can go on forever, like minecraft but 2d, and im going to use cubes. But the issue with this, is that for some reason if I am running on an update function, I am only able to generate about 30 blocks a second, when my framerate is upwords of 300… This is the same for Delete(gameobject)…
Instantiate and Destroy methods of unity are slow because of garbage collection and the alternative
that is mostly used is object pooling , that you can make an object pooling system of your own
(tutorial)or use a plugin like poolManager
For minecraft like games you should consider using a voxel generation method, instead of handling individual objects. This basically cheats by creating one huge GameObject, and modifying it as individual cubes are added and removes.