Adding trees dynamically - part 2 (the mission)

Can somebody show me an example code of how to put trees to the terrainData choosing the position and the type of tree?

I would recommend using the built in terrain options in Unity (Terrain -> create terrain -> Mass place trees) for putting the trees yourself. You can edit settings for the size of the trees and do lots of randomizing so the trees wont look the same.

And ofcourse check thisTerrainToolKit and watch the tutorial how to use it.

-----Edited-------

I hope this example for loading information of a xml file suits your needs Unity3d Forums