unity-terrain
Skill7 starsChanged 7 months agoMITView on GitHub
Use when users want to create terrain, set heights, paint textures, or add trees.
In this repository34 other files it gives its agents.
- unity-mcp-skillsSkill
- unity-animatorSkill
- unity-assetSkill
- unity-cameraSkill
- unity-cinemachineSkill
- unity-cleanerSkill
- unity-componentSkill
- unity-consoleSkill
- unity-editorSkill
- unity-eventSkill
- unity-gameobjectSkill
- unity-importerSkill
- unity-lightSkill
- unity-materialSkill
- unity-navmeshSkill
- unity-optimizationSkill
- unity-packageSkill
- unity-perceptionSkill
- unity-physicsSkill
- unity-prefabSkill
- unity-probuilderSkill
- unity-projectSkill
- unity-sceneSkill
- unity-scriptableobjectSkill
- unity-scriptSkill
- unity-shaderSkill
- unity-smartSkill
- unity-testSkill
- unity-timelineSkill
- unity-toolingSkill
- unity-uiSkill
- unity-uitoolkitSkill
- unity-validationSkill
- unity-xrSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Create a new Terrain GameObject with TerrainData asset.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Unity Terrain Skills
Overview
Note: Terrain operations require an existing Terrain in the scene, or use
terrain_createto generate one.
Common Mistakes
DO NOT (common hallucinations):
terrain_set_texturedoes not exist → useterrain_paint_texturewith layer index and brush parametersterrain_add_tree/terrain_add_grassdo not exist → these require Unity Terrain tools or custom scriptsterrain_set_sizedoes not exist → terrain dimensions are set at creation viaterrain_createterrain_import_heightmap/terrain_set_heightsdo not exist → useterrain_set_heights_batchwith a 2D heights array ([z][x]values 0-1)
Routing:
- For terrain material → use
materialmodule on terrain's material - For objects on terrain → use
gameobjectmodule to create/place objects
Skills Overview
| Skill | Description |
terrain_create | Create new Terrain with TerrainData |
terrain_get_info | Get terrain size, resolution, layers |
terrain_get_height | Get height at world position |
terrain_set_height | Set height at normalized coords |
terrain_set_heights_batch | Batch set heights in region |
terrain_add_hill | ⭐ Add smooth hill with radius and falloff |
terrain_generate_perlin | ⭐ Generate natural terrain using Perlin noise |
terrain_smooth | ⭐ Smooth terrain to reduce sharp edges |
terrain_flatten | ⭐ Flatten terrain to target height |
terrain_paint_texture | Paint texture layer at position |
Skills
terrain_create
Create a new Terrain GameObject with TerrainData asset.
| Parameter | Type | Required | Default | Description |
name | string | No | "Terrain" | Terrain name |
width | int | No | 500 | Terrain width (X) |
length | int | No | 500 | Terrain length (Z) |
height | int | No | 100 | Max terrain height (Y) |
heightmapResolution | int | No | 513 | Heightmap resolution (power of 2 + 1) |
x, y, z | float | No | 0 | Position |
Returns: {success, name, instanceId, terrainDataPath, size, position}
terrain_get_info
Get terrain information.
| Parameter | Type | Required | Description |
name | string | No* | Terrain name |
instanceId | int | No* | Instance ID |
*If neither provided, uses first terrain in scene
Returns: {success, name, size, heightmapResolution, alphamapResolution, terrainLayerCount, layers}
terrain_get_height
Get terrain height at world position.
| Parameter | Type | Required | Description |
worldX | float | Yes | World X coordinate |
worldZ | float | Yes | World Z coordinate |
name | string | No | Terrain name |
Returns: {success, worldX, worldZ, height, worldY}
terrain_set_height
Set height at normalized coordinates.
| Parameter | Type | Required | Description |
normalizedX | float | Yes | X position (0-1) |
normalizedZ | float | Yes | Z position (0-1) |
height | float | Yes | Height value (0-1) |
name | string | No | Terrain name |
Returns: {success, normalizedX, normalizedZ, height, pixelX, pixelZ}
terrain_set_heights_batch
⚠️ BATCH SKILL: Set heights in rectangular region.
| Parameter | Type | Required | Description |
startX | int | Yes | Start X pixel index |
startZ | int | Yes | Start Z pixel index |
heights | float[][] | Yes | 2D array [z][x] with values 0-1 |
name | string | No | Terrain name |
Returns: {success, startX, startZ, modifiedWidth, modifiedLength, totalPointsModified}
See ../../recipes/terrain/<command>.md for C# templates.
terrain_add_hill
⭐ RECOMMENDED: Add a smooth, natural-looking hill to the terrain.
| Parameter | Type | Required | Default | Description |
normalizedX | float | Yes | - | X position (0-1) |
normalizedZ | float | Yes | - | Z position (0-1) |
radius | float | No | 0.2 | Hill radius (0-1, relative to terrain size) |
height | float | No | 0.5 | Hill height (0-1) |
smoothness | float | No | 1.0 | Smoothness factor (higher = smoother) |
name | string | No | null | Terrain name |
Returns: {success, centerX, centerZ, radius, height, affectedArea}
See ../../recipes/terrain/<command>.md for C# templates.
terrain_generate_perlin
⭐ RECOMMENDED: Generate natural-looking terrain using Perlin noise algorithm.
| Parameter | Type | Required | Default | Description |
scale | float | No | 20.0 | Noise scale (lower = larger features) |
heightMultiplier | float | No | 0.3 | Height intensity (0-1) |
octaves | int | No | 4 | Detail layers (more = more detail) |
persistence | float | No | 0.5 | Amplitude decrease per octave |
lacunarity | float | No | 2.0 | Frequency increase per octave |
seed | int | No | 0 | Random seed (0 = random) |
name | string | No | null | Terrain name |
Returns: {success, resolution, scale, heightMultiplier, octaves, persistence, lacunarity, seed}
See ../../recipes/terrain/<command>.md for C# templates.
terrain_smooth
⭐ Smooth terrain heights to reduce sharp edges and create natural transitions.
| Parameter | Type | Required | Default | Description |
normalizedX | float | Yes | - | X position (0-1) |
normalizedZ | float | Yes | - | Z position (0-1) |
radius | float | No | 0.1 | Smoothing radius (0-1) |
iterations | int | No | 1 | Number of smoothing passes |
name | string | No | null | Terrain name |
Returns: {success, centerX, centerZ, radius, iterations, affectedArea}
See ../../recipes/terrain/<command>.md for C# templates.
terrain_flatten
⭐ Flatten terrain to a specific height in a region.
| Parameter | Type | Required | Default | Description |
normalizedX | float | Yes | - | X position (0-1) |
normalizedZ | float | Yes | - | Z position (0-1) |
targetHeight | float | No | 0.5 | Target height (0-1) |
radius | float | No | 0.1 | Flatten radius (0-1) |
strength | float | No | 1.0 | Flatten strength (0-1) |
name | string | No | null | Terrain name |
Returns: {success, centerX, centerZ, targetHeight, radius, strength}
See ../../recipes/terrain/<command>.md for C# templates.
terrain_paint_texture
Paint terrain texture layer. Requires terrain layers already configured.
| Parameter | Type | Required | Default | Description |
normalizedX | float | Yes | - | X position (0-1) |
normalizedZ | float | Yes | - | Z position (0-1) |
layerIndex | int | Yes | - | Terrain layer index (0-based; use terrain_get_info to query available layers) |
strength | float | No | 1.0 | Paint strength |
brushSize | int | No | 10 | Brush size in pixels |
name | string | No | null | Terrain name |
Returns: {success, layerIndex, layerName, centerX, centerZ}
Example Usage
See ../../recipes/terrain/<command>.md for C# templates.
Recipe path rule: ../../recipes/terrain/<command>.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

