How to snap cubes together like Minecraft?

I just now picked up Unity and Ive gotten pretty far in my game, but Im stuck. How do I make it so that when I place my mouse over a cube and left click it, it will create a block that is connected to the others; like Minecraft (or Fortresscraft). Please explain how it works to (if you want) so that I understand what Im doing.

Check out this similar question’s answer with source code, live example and downloadable unity package.

It works by sampling the normal of the hit cube surface to determine which way the new cube should be placed.

It’s just a few lines of code.

This may help you:
http://www.mediafire.com/?w422rfx80jcws4s

You can thank me later :slight_smile: