Up to date Unity building placement code/tutorials?

Hey guys, I’m searching around but does anyone anyone know where I can find up to date code or tutorials on building placement ( the kind you have in RTS’ and city builders )? If it also included details on how to snap building to a grid that would be great.

I’ve found lots of old tutorials but a lot of these date back to 2012 and the people who made them never bothered updating their code. It would be great if you could point me towards an example code or tutorial that actually works with the current version.


My bad, completely my bad, what had happened was that I had written out this code and tried following a tutorial during a heatwave. So my brain was so screwed that I wasn’t concentrating on what I was doing, just by going through it again I have fixed several errors.

Why is it you sometimes only solve a problem after you’ve written down a question? Anyway, I’m down to one error now but it will be an easy fix.