README.md
June 4, 2026 ยท View on GitHub
Unity AI Terrain
AI-powered tools for the Unity Terrain workflow. Create Terrain GameObjects backed by new TerrainData, set heightmap resolution and world size, sculpt and sample heights over a region or the whole terrain, manage TerrainLayers, paint texture layers onto the alphamap, configure detail and tree prototypes, scatter trees, stitch neighbor terrains, and modify any terrain component field directly through natural language commands โ no manual inspector navigation. Wraps Unity's built-in Terrain modules (com.unity.modules.terrain + com.unity.modules.terrainphysics). Ideal for rapid greyboxing, procedural landscape generation, and terrain authoring. Built on top of the AI Game Developer platform.
How to use
Stability status
| Unity Version | Editmode | Playmode | Standalone |
|---|---|---|---|
| 2022.3.62f3 | |||
| 2023.2.22f1 | |||
| 6000.3.1f1 |
AI Terrain Tools
16 tools, grouped by purpose:
Terrain lifecycle
terrain-create- Create aTerrainGameObject backed by a newTerrainDataasset (heightmap resolution + size)terrain-list- List all Terrains in the active scene (name, size, heightmap resolution, layer count)terrain-get- Get a Terrain's data (size, resolutions, layers, prototypes, tree count, neighbors)
Shape & heightmap
terrain-set-heightmap-resolution- Set the heightmap resolution (rounded to a valid 2^n + 1)terrain-set-size- Set the terrain world size (width / height / length)terrain-set-heights- Set heightmap values over a region (or whole terrain): uniform fill or explicit 2D arrayterrain-sample-heights- Read heightmap values over a region (or whole terrain) with min/max/average stats
Layers & painting
terrain-add-layer- Add aTerrainLayer(from an existing asset or a new layer built from a texture)terrain-remove-layer- Remove aTerrainLayerby indexterrain-paint-layer- Paint a layer over a region by writing the alphamap (splatmap)
Detail, trees & tiling
terrain-set-detail-prototypes- Replace the detail prototypes (grass / detail meshes) from textures / prefabsterrain-set-tree-prototypes- Replace the tree prototypes from prefabsterrain-place-trees- Place trees: random scatter (count) or explicit normalized positionsterrain-set-neighbors- Set the left / top / right / bottom neighbor Terrains so Unity blends seams
Generic
terrain-get-component- Generic read: serialize aTerrain/TerrainCollidercomponent via ReflectorNetterrain-modify-component- Generic write: apply aSerializedMemberdiff to a terrain component via ReflectorNet (escape hatch for fields not covered by the dedicated tools)
Installation
Option 1 - Installer
- Download Installer
- Import installer into Unity project
- You can double-click on the file - Unity will open it automatically
- OR: Open Unity Editor first, then click on
Assets/Import Package/Custom Package, and choose the file
Option 2 - OpenUPM-CLI
- Install OpenUPM-CLI
- Open the command line in your Unity project folder
openupm add com.ivanmurzak.unity.mcp.terrain