Batch import terrain with editor scripts

Is it possible to batch import terrains with editor scripts?

This is the closest script I can find That script applies a single height map image to a single terrain object. The terrain object has to be already created.

I am trying to write a script to batch import a grid of terrain files.

Psudocode will look like this (repeated for each terrain tiles):

For each terrain tile 1) Editor script creates a new terrain. Replicate functionality of "Editor->create terrain"

2) Editor script sets parameters of the terrain it just created. Replicate functionality of "Editor->Set Resolution"

3) Editor script selects the blank terrain and imports the terrain tile's file map (raw file). (needs to set byte order).

I believe this is what is needed:

If you have a truly huge number of tiles, you should either add a feature to that script... or generate it's input ;-)