Paint a terrain in runtime

hey people i am making a terrain editor for runtime mode , i just want to know how to siply paint the terrain , scripts would be nice , much thanx

Do you mean how to alter the splatmaps at runtime via code (pretty straightforward) or how to get the whole paintbursh widgets and brushes working (not trivial)?