Hard to explain what I'm after in just a title, but my Googling hasn't found anything quite like what I need. I'm looking for a tutorial on how to make an in-game editor that uses blocks on a grid, where the blocks kind of magnetize to each other, so you can't just build anywhere, it all has to connect up. This is something I made years ago in Game Maker Studio, so the code is really messy and not worth unpicking as it's in GML. It was made very early in my learning of game development, so the code is really bad anyway. There's a .gif here - https://twitter.com/EstragonHelmer/status/858451285485518848 But it's a good example of what I'm looking for. I'm not entirely sure how to search for that because all I kept getting were tutorials on how to make stuff snap to the grid in Unity's editor, rather than in-game. Does anyone know any good tutorials for something similar to this?