Answers for "I need to Snap a 3d object to a grid when it is placed in game."
http://answers.unity.com/questions/969001/i-need-to-snap-a-3d-object-to-a-grid-when-it-is-pl.html
The latest answers for the question "I need to Snap a 3d object to a grid when it is placed in game."Answer by Cherno
http://answers.unity.com/answers/969314/view.html
This is more a basic math question. You need to take the XYZ values of the transform.position and round it to the nearest multiple of you grid size.
There are a lot of examples on the net, here is one that should suit your needs, might need modification due to floating point numbers, but the basic theory is the same:
[How to round an integer up or down to the nearest 10 using Javascript][1]
[find nearest multiple of x][2]
[1]: http://stackoverflow.com/questions/1684202/how-to-round-an-integer-up-or-down-to-the-nearest-10-using-javascript
[2]: https://www.google.de/webhp?sourceid=chrome-instant&rlz=1C1NNVC_enDE532DE591&ion=1&espv=2&ie=UTF-8#q=find%20nearest%20multiple%20of%20xMon, 18 May 2015 10:47:44 GMTCherno