How can I generate terrain trees at runtime?

I know you can change the terrain at runtime but is there any way to add trees?

I know trees can be deleted but I’d like to be able to add or at least reposition them while the game is running. While searching I came across terraindata.RecalculateTreePositions() but there’s no mention of it in the script reference.

Here’s a script that randomly places trees around the position of player.
You can modify that script to suit your needs.