I am trying to make a 2d minecraft like survival game as a hobby. I am having a problem getting a grid and level generation to work. I have block selection, A flat level generation, a way to place blocks but not break them, and that’s all I have so far.
If you see the blocks are not placed in a grid instead they are everywhere:

Do you guys know how I can get a grid going and how I can get it to delete blocks. So far blocks are placed at my mouse position using a raycast. All help is appreciated!

If you show your placement code, someone is likely will help you figure out out to align the blocks. It would help to know the world size of your blocks. We ask that each question only have one issue, so I'd post breaking blocks as a separate issue. Note that for large-world, minecraft-type games, the 'blocks' are not handled as individual game objects. Search UA for 'minecraft' or 'voxel' for more information.
– robertbu