Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计通过

unity-terrainUnity terrain 命令行

Agent Skill

unity-terrain 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

279

周安装

12

GitHub Stars

886

下载量

98
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:unity-terrain(Unity terrain 命令行)
来源仓库:https://github.com/besty0728/unity-skills
仓库路径:skills/unity-terrain
安装命令:
npx skills add https://github.com/besty0728/unity-skills --skill unity-terrain
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/besty0728/unity-skills --skill unity-terrain

简介

Unity Terrain 命令行工具,用于处理 GitHub 仓库协作信息。

  • 适用于需要同步地形编辑历史或管理团队分支变更的场景。
  • 可在 AI 宿主中调用以辅助版本管理与合并冲突解决。
  • 安装命令:npx skills add https://github.com/besty0728/unity-skills --skill unity-terrain
  • 需评估其对复杂二进制文件的处理能力限制

SKILL.md

Unity Terrain Skills

Note: Terrain operations require an existing Terrain in the scene, or use terrain_create to generate one.

Guardrails

Mode: Full-Auto required

DO NOT (common hallucinations):

  • terrain_set_texture does not exist → use terrain_paint_texture with layer index and brush parameters
  • terrain_add_tree / terrain_add_grass do not exist → these require Unity Terrain tools or custom scripts
  • terrain_set_size does not exist → terrain dimensions are set at creation via terrain_create
  • terrain_import_heightmap / terrain_set_heights do not exist → use terrain_set_heights_batch with a 2D heights array ([z][x] values 0-1)

Routing:

  • For terrain material → use material module on terrain's material
  • For objects on terrain → use gameobject module to create/place objects

Skills Overview

SkillDescription
terrain_createCreate new Terrain with TerrainData
terrain_get_infoGet terrain size, resolution, layers
terrain_get_heightGet height at world position
terrain_set_heightSet height at normalized coords
terrain_set_heights_batchBatch 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_texturePaint texture layer at position

Skills

terrain_create

Create a new Terrain GameObject with TerrainData asset.

ParameterTypeRequiredDefaultDescription
namestringNo"Terrain"Terrain name
widthintNo500Terrain width (X)
lengthintNo500Terrain length (Z)
heightintNo100Max terrain height (Y)
heightmapResolutionintNo513Heightmap resolution (power of 2 + 1)
x, y, zfloatNo0Position

Returns: {success, name, instanceId, terrainDataPath, size, position}

terrain_get_info

Get terrain information.

ParameterTypeRequiredDescription
namestringNo*Terrain name
instanceIdintNo*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.

ParameterTypeRequiredDescription
worldXfloatYesWorld X coordinate
worldZfloatYesWorld Z coordinate
namestringNoTerrain name

Returns: {success, worldX, worldZ, height, worldY}

terrain_set_height

Set height at normalized coordinates.

ParameterTypeRequiredDescription
normalizedXfloatYesX position (0-1)
normalizedZfloatYesZ position (0-1)
heightfloatYesHeight value (0-1)
namestringNoTerrain name

Returns: {success, normalizedX, normalizedZ, height, pixelX, pixelZ}

terrain_set_heights_batch

⚠️ BATCH SKILL: Set heights in rectangular region.

ParameterTypeRequiredDescription
startXintYesStart X pixel index
startZintYesStart Z pixel index
heightsfloat[][]Yes2D array [z][x] with values 0-1
namestringNoTerrain name

Returns: {success, startX, startZ, modifiedWidth, modifiedLength, totalPointsModified}

# Example: Create a 10x10 hill
heights = [[0.5 - abs(x-5)/10 - abs(z-5)/10 for x in range(10)] for z in range(10)]
call_skill("terrain_set_heights_batch", startX=50, startZ=50, heights=heights)

terrain_add_hill

RECOMMENDED: Add a smooth, natural-looking hill to the terrain.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
radiusfloatNo0.2Hill radius (0-1, relative to terrain size)
heightfloatNo0.5Hill height (0-1)
smoothnessfloatNo1.0Smoothness factor (higher = smoother)
namestringNonullTerrain name

Returns: {success, centerX, centerZ, radius, height, affectedArea}

# Add a large smooth hill at center
call_skill("terrain_add_hill",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.3, height=0.6, smoothness=2.0)

# Add multiple hills for varied terrain
for i in range(5):
    call_skill("terrain_add_hill",
        normalizedX=random.uniform(0.2, 0.8),
        normalizedZ=random.uniform(0.2, 0.8),
        radius=random.uniform(0.1, 0.25),
        height=random.uniform(0.3, 0.7))

terrain_generate_perlin

RECOMMENDED: Generate natural-looking terrain using Perlin noise algorithm.

ParameterTypeRequiredDefaultDescription
scalefloatNo20.0Noise scale (lower = larger features)
heightMultiplierfloatNo0.3Height intensity (0-1)
octavesintNo4Detail layers (more = more detail)
persistencefloatNo0.5Amplitude decrease per octave
lacunarityfloatNo2.0Frequency increase per octave
seedintNo0Random seed (0 = random)
namestringNonullTerrain name

Returns: {success, resolution, scale, heightMultiplier, octaves, persistence, lacunarity, seed}

# Generate rolling hills
call_skill("terrain_generate_perlin",
    scale=25.0, heightMultiplier=0.4, octaves=4)

# Generate mountainous terrain
call_skill("terrain_generate_perlin",
    scale=15.0, heightMultiplier=0.6, octaves=6, persistence=0.6)

# Generate with specific seed for reproducibility
call_skill("terrain_generate_perlin",
    scale=20.0, heightMultiplier=0.5, seed=12345)

terrain_smooth

⭐ Smooth terrain heights to reduce sharp edges and create natural transitions.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
radiusfloatNo0.1Smoothing radius (0-1)
iterationsintNo1Number of smoothing passes
namestringNonullTerrain name

Returns: {success, centerX, centerZ, radius, iterations, affectedArea}

# Smooth a specific area
call_skill("terrain_smooth",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.2, iterations=3)

terrain_flatten

⭐ Flatten terrain to a specific height in a region.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
targetHeightfloatNo0.5Target height (0-1)
radiusfloatNo0.1Flatten radius (0-1)
strengthfloatNo1.0Flatten strength (0-1)
namestringNonullTerrain name

Returns: {success, centerX, centerZ, targetHeight, radius, strength}

# Create a flat plateau
call_skill("terrain_flatten",
    normalizedX=0.5, normalizedZ=0.5,
    targetHeight=0.6, radius=0.15, strength=1.0)

terrain_paint_texture

Paint terrain texture layer. Requires terrain layers already configured.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
layerIndexintYes-Terrain layer index (0-based; use terrain_get_info to query available layers)
strengthfloatNo1.0Paint strength
brushSizeintNo10Brush size in pixels
namestringNonullTerrain name

Returns: {success, layerIndex, layerName, centerX, centerZ}


Example Usage

import unity_skills

# === Method 1: Quick terrain with Perlin noise (RECOMMENDED) ===
# Create terrain
result = unity_skills.call_skill("terrain_create",
    name="MyTerrain", width=200, length=200, height=50)

# Generate natural terrain with Perlin noise
unity_skills.call_skill("terrain_generate_perlin",
    scale=20.0,           # Larger scale = bigger features
    heightMultiplier=0.4, # Height intensity
    octaves=5,            # More octaves = more detail
    persistence=0.5,
    lacunarity=2.0)

# === Method 2: Add individual smooth hills ===
# Create flat terrain
result = unity_skills.call_skill("terrain_create",
    name="HillyTerrain", width=200, length=200, height=50)

# Add multiple smooth hills
import random
for i in range(8):
    unity_skills.call_skill("terrain_add_hill",
        normalizedX=random.uniform(0.2, 0.8),
        normalizedZ=random.uniform(0.2, 0.8),
        radius=random.uniform(0.15, 0.3),
        height=random.uniform(0.3, 0.6),
        smoothness=1.5)  # Higher = smoother

# Smooth the entire terrain for natural transitions
unity_skills.call_skill("terrain_smooth",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.5, iterations=2)

# === Method 3: Create specific features ===
# Create a mountain
unity_skills.call_skill("terrain_add_hill",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.25, height=0.8, smoothness=2.0)

# Create a flat plateau on top
unity_skills.call_skill("terrain_flatten",
    normalizedX=0.5, normalizedZ=0.5,
    targetHeight=0.8, radius=0.1, strength=1.0)

# === Method 4: Manual height control (advanced) ===
import math
heights = []
for z in range(64):
    row = []
    for x in range(64):
        # Distance from center
        dx = (x - 32) / 32
        dz = (z - 32) / 32
        dist = math.sqrt(dx*dx + dz*dz)
        # Smooth hill with cosine falloff
        h = max(0, 0.5 * math.cos(dist * math.pi / 2)) if dist < 1 else 0
        row.append(h)
    heights.append(row)

unity_skills.call_skill("terrain_set_heights_batch",
    startX=100, startZ=100, heights=heights)

# Query height at world position
info = unity_skills.call_skill("terrain_get_height", worldX=100, worldZ=100)
print(f"Height at position: {info['height']}")

Workflow Integration

All terrain operations support workflow undo/redo:

# Start workflow session
unity_skills.call_skill("workflow_session_start", tag="Create Terrain")

# Create and modify terrain
unity_skills.call_skill("terrain_create", name="TestTerrain")
unity_skills.call_skill("terrain_generate_perlin", scale=20, heightMultiplier=0.5)
unity_skills.call_skill("terrain_add_hill", normalizedX=0.3, normalizedZ=0.3, radius=0.2)

# End session
unity_skills.call_skill("workflow_session_end")

# Later: Undo entire terrain creation
sessions = unity_skills.call_skill("workflow_session_list")
unity_skills.call_skill("workflow_session_undo", sessionId=sessions['sessions'][0]['sessionId'])

Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.43%
按下载量换算32

Claude

31.7%
按下载量换算31

Cursor

16.75%
按下载量换算16

Gemini CLI

9.98%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills