Can you tell me how Terrain Smooth works?

Dear Unity Devs or people with high knowledge towards Unity!(and actually dear evryone)

Im trying to make an RTS game and im currently programming the place building part.
Im flattening the terrain below the buidings, this is okey but after that im trying to make some smoothing algorythm around my building, this is the part im not satisfied atm, im using a quite dumb algorythm to do this atm, and its kinda meh

After playing with Unity ingame smoothing tool, i really like how it works, but i have the feeling that it is using just gausian blur on the heightmap(.raw file), my question is do my feeling right?

And my second question is, i cant alter my heightmap in game-time right?

No one? :frowning: