terrain-set-heightmap-resolution

Sets the heightmap resolution of a Unity Terrain's TerrainData with automatic 2^n + 1 rounding.

Updated May 20, 2026
One-click install
npx skills add https://github.com/Alltwice/Unity-3D-Project --skill terrain-set-heightmap-resolution-alltwice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: terrain-set-heightmap-resolution
Source: https://github.com/Alltwice/Unity-3D-Project/tree/main/.agents/skills/terrain-set-heightmap-resolution
Command: npx skills add https://github.com/Alltwice/Unity-3D-Project --skill terrain-set-heightmap-resolution-alltwice

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Changing a Unity Terrain's heightmap resolution requires assigning a valid 2^n + 1 value and accepting that Unity destructively resamples the existing heightmap, which is easy to get wrong manually. ## Core Features & Use Cases - Resolution Assignment: Assigns TerrainData.heightmapResolution on the Unity main thread via the unity-mcp-cli tool. - Automatic Value Correction: Rounds the requested resolution up to a valid 2^n + 1 value, clamped to Unity's [33, 4097] range. - Editor Integration: Marks the asset and scene dirty and repaints the editor after the change. - Use Case: You need to increase a terrain's detail from 513 to 1025 for finer sculpting; pass the GameObject reference and target resolution, and the tool resolves and applies the nearest valid value. ## Quick Start Ask the AI to set the heightmap resolution of your Terrain GameObject to a target value such as 1025 using the terrain-set-heightmap-resolution tool.

Frequently Asked Questions about terrain-set-heightmap-resolution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I change the heightmap resolution of a Unity Terrain?▼

Assign TerrainData.heightmapResolution with a valid 2^n + 1 value. This tool does it via unity-mcp-cli by passing a gameObjectRef and the requested heightmapResolution, which is rounded up to the nearest valid value.

What values are valid for Unity terrain heightmap resolution?▼

Unity accepts heightmap resolutions of 2^n + 1, clamped to the range [33, 4097]. If you request an arbitrary number, the tool rounds it up to the next valid resolution automatically.

Does changing heightmap resolution destroy existing terrain height data?▼

Yes, changing heightmap resolution is destructive. Unity resamples the existing heightmap to the new resolution, so fine detail can be lost when lowering the resolution.

How do I reference the Terrain GameObject for this tool?▼

Provide a gameObjectRef using the GameObject's instanceID (preferred), its hierarchy path such as 'environment/terrain', or its name. The tool locates the GameObject in the active scene or opened prefab.

Why is unity-mcp-cli not found when running the command?▼

The CLI is not installed or not on your PATH. Install it globally with 'npm install -g unity-mcp-cli' or invoke it through 'npx unity-mcp-cli' instead.