- Home /
Batch import terrain with editor scripts
Is it possible to batch import terrains with editor scripts?
This is the closest script I can find http://answers.unity3d.com/questions/9972/terrain-height-map-import 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).
Answer by Waz · Aug 18, 2010 at 07:00 AM
I believe this is what is needed:
http://www.unifycommunity.com/wiki/index.php?title=TerrainImporter
If you have a truly huge number of tiles, you should either add a feature to that script... or generate it's input ;-)
Your answer
![](https://koobas.hobune.stream/wayback/20220613062654im_/https://answers.unity.com/themes/thub/images/avi.jpg)