Unity Level Design
Overview
Rapidly prototype Unity game scenes using Editor automation, modern Unity APIs, and best practices for level design. This skill automates terrain generation, lighting setup, environment placement, and player controller creation to get you implementing gameplay ideas quickly.
When to Use
Use this skill when:
- Creating prototype scenes (post-apocalypse, fantasy, sci-fi, dungeon crawler, etc.)
- Setting up Unity terrain, meshes, and ground geometry
- Automating lighting, post-processing, and environment setup
- Building player controllers and basic gameplay systems
- Need to go from concept to playable scene rapidly
Core Workflow
Step 1: Research Current APIs
Before implementing, check Unity's latest APIs and best practices:
Modern Unity Systems:
- Terrain Tools package (GPU-accelerated sculpting)
- Universal Render Pipeline (URP) or High Definition Render Pipeline (HDRP)
- DOTS/ECS for performance-critical scenarios
- Shader Graph for custom materials
- VFX Graph for particle effects
Key APIs to reference:
UnityEngine.Terrain - Terrain manipulation
UnityEditor.TerrainTools - Editor terrain tools
UnityEngine.Rendering.Universal - URP components
UnityEditor.SceneManagement - Scene automation
Step 2: Scene Setup Automation
Use Editor scripts to automate repetitive setup:
// Example: Automated scene initialization
public static class SceneSetupHelper
{
[MenuItem("Level Design/Create Basic Scene")]
public static void CreateBasicScene()
{
// Setup lighting
SetupLighting();
// Create terrain
CreateTerrain();
// Setup post-processing
SetupPostProcessing();
// Create player
CreatePlayerController();
}
}
Step 3: Terrain Generation
Options:
- Unity Terrain - Best for natural landscapes
- Mesh Generation - Best for stylized/architectural
- Procedural Generation - Best for endless/replayable worlds
Step 4: Environment & Props
Automate placement of:
- Vegetation (trees, grass, rocks)
- Structures (buildings, ruins, dungeons)
- Lighting (sun, ambient, point lights)
- Effects (fog, particles, post-processing)
Step 5: Player & Gameplay
Create basic:
- Player controller (FPS, third-person, top-down)
- Camera setup
- Input handling
- Basic interactions
Scene Types
Post-Apocalyptic Scene
- Destroyed urban environment
- Ruined buildings and debris
- Overgrown vegetation
- Atmospheric fog and lighting
- Scattered resources/props
Fantasy Forest
- Dense woodland terrain
- Rivers and lakes
- Fantasy vegetation
- Magical lighting effects
- Pathways and clearings
Dungeon Crawler
- Procedural room generation
- Corridor systems
- Torch/candle lighting
- Traps and enemy spawners
- Loot chests
Quick Reference
| Task |
Method |
API/Tool |
| Create Terrain |
Editor script |
Terrain.CreateTerrainGameObject |
| Sculpt Terrain |
Noise/heightmaps |
TerrainData.SetHeights |
| Add Vegetation |
Tree/Grass painting |
TerrainData.treeInstances |
| Setup Lighting |
URP/HDRP |
UniversalAdditionalLightData |
| Post-Processing |
Volume components |
Volume + profiles |
| Player Controller |
Character Controller |
CharacterController component |
| Procedural Meshes |
Runtime generation |
Mesh class |
Editor Tools
See scripts/ for automation tools:
SceneSetupWizard.cs - One-click scene initialization
TerrainGenerator.cs - Procedural terrain creation
EnvironmentPainter.cs - Batch environment placement
LightingSetup.cs - Automated lighting configuration
References
See references/ for detailed documentation:
unity-apis.md - Current Unity API reference
terrain-tools.md - Terrain system documentation
urp-setup.md - Universal Render Pipeline guide
level-design-patterns.md - Best practices and patterns
Common Mistakes
- Wrong render pipeline: Check if project uses URP, HDRP, or Built-in RP
- Terrain scale: Unity terrain uses different height/length scales
- Lighting baking: Realtime GI can be slow; use baked lighting for static geometry
- Performance: Too many trees/colliders will kill performance
- Scale consistency: Keep player, environment, and props to consistent scale
Example Usage
// Create a post-apocalyptic scene
[MenuItem("Level Design/Post-Apocalyptic Scene")]
static void CreatePostApocalypticScene()
{
// 1. Create terrain with noise
var terrain = TerrainGenerator.CreateRuinedTerrain();
// 2. Setup dramatic lighting
LightingSetup.CreateDramaticLighting(Color.gray * 0.3f);
// 3. Add fog and post-processing
PostProcessingSetup.CreateAtmosphericFog();
// 4. Scatter debris and props
EnvironmentPainter.ScatterDebris(50);
// 5. Create player
var player = PlayerSetup.CreateFPSPlayer();
player.transform.position = new Vector3(0, 5, 0);
}
1---2name: unity-level-design3description: Use when creating Unity game scenes and prototypes, building level designs, or automating Unity Editor workflows for terrain, lighting, environment setup, and player controllers. Use for post-apocalyptic scenes, fantasy forests, dungeon crawlers, and other game environments that need rapid prototyping.4---56# Unity Level Design78## Overview910Rapidly prototype Unity game scenes using Editor automation, modern Unity APIs, and best practices for level design. This skill automates terrain generation, lighting setup, environment placement, and player controller creation to get you implementing gameplay ideas quickly.1112## When to Use1314Use this skill when:15- Creating prototype scenes (post-apocalypse, fantasy, sci-fi, dungeon crawler, etc.)16- Setting up Unity terrain, meshes, and ground geometry17- Automating lighting, post-processing, and environment setup18- Building player controllers and basic gameplay systems19- Need to go from concept to playable scene rapidly2021## Core Workflow2223### Step 1: Research Current APIs2425Before implementing, check Unity's latest APIs and best practices:2627**Modern Unity Systems:**28- Terrain Tools package (GPU-accelerated sculpting)29- Universal Render Pipeline (URP) or High Definition Render Pipeline (HDRP)30- DOTS/ECS for performance-critical scenarios31- Shader Graph for custom materials32- VFX Graph for particle effects3334**Key APIs to reference:**35- `UnityEngine.Terrain` - Terrain manipulation36- `UnityEditor.TerrainTools` - Editor terrain tools37- `UnityEngine.Rendering.Universal` - URP components38- `UnityEditor.SceneManagement` - Scene automation3940### Step 2: Scene Setup Automation4142Use Editor scripts to automate repetitive setup:4344```csharp45// Example: Automated scene initialization46public static class SceneSetupHelper47{48 [MenuItem("Level Design/Create Basic Scene")]49 public static void CreateBasicScene()50 {51 // Setup lighting52 SetupLighting();53 54 // Create terrain55 CreateTerrain();56 57 // Setup post-processing58 SetupPostProcessing();59 60 // Create player61 CreatePlayerController();62 }63}64```6566### Step 3: Terrain Generation6768**Options:**691. **Unity Terrain** - Best for natural landscapes702. **Mesh Generation** - Best for stylized/architectural713. **Procedural Generation** - Best for endless/replayable worlds7273### Step 4: Environment & Props7475Automate placement of:76- Vegetation (trees, grass, rocks)77- Structures (buildings, ruins, dungeons)78- Lighting (sun, ambient, point lights)79- Effects (fog, particles, post-processing)8081### Step 5: Player & Gameplay8283Create basic:84- Player controller (FPS, third-person, top-down)85- Camera setup86- Input handling87- Basic interactions8889## Scene Types9091### Post-Apocalyptic Scene92- Destroyed urban environment93- Ruined buildings and debris94- Overgrown vegetation95- Atmospheric fog and lighting96- Scattered resources/props9798### Fantasy Forest99- Dense woodland terrain100- Rivers and lakes101- Fantasy vegetation102- Magical lighting effects103- Pathways and clearings104105### Dungeon Crawler106- Procedural room generation107- Corridor systems108- Torch/candle lighting109- Traps and enemy spawners110- Loot chests111112## Quick Reference113114| Task | Method | API/Tool |115|------|--------|----------|116| Create Terrain | Editor script | `Terrain.CreateTerrainGameObject` |117| Sculpt Terrain | Noise/heightmaps | `TerrainData.SetHeights` |118| Add Vegetation | Tree/Grass painting | `TerrainData.treeInstances` |119| Setup Lighting | URP/HDRP | `UniversalAdditionalLightData` |120| Post-Processing | Volume components | `Volume` + profiles |121| Player Controller | Character Controller | `CharacterController` component |122| Procedural Meshes | Runtime generation | `Mesh` class |123124## Editor Tools125126See `scripts/` for automation tools:127- `SceneSetupWizard.cs` - One-click scene initialization128- `TerrainGenerator.cs` - Procedural terrain creation129- `EnvironmentPainter.cs` - Batch environment placement130- `LightingSetup.cs` - Automated lighting configuration131132## References133134See `references/` for detailed documentation:135- `unity-apis.md` - Current Unity API reference136- `terrain-tools.md` - Terrain system documentation137- `urp-setup.md` - Universal Render Pipeline guide138- `level-design-patterns.md` - Best practices and patterns139140## Common Mistakes141142- **Wrong render pipeline**: Check if project uses URP, HDRP, or Built-in RP143- **Terrain scale**: Unity terrain uses different height/length scales144- **Lighting baking**: Realtime GI can be slow; use baked lighting for static geometry145- **Performance**: Too many trees/colliders will kill performance146- **Scale consistency**: Keep player, environment, and props to consistent scale147148## Example Usage149150```csharp151// Create a post-apocalyptic scene152[MenuItem("Level Design/Post-Apocalyptic Scene")]153static void CreatePostApocalypticScene()154{155 // 1. Create terrain with noise156 var terrain = TerrainGenerator.CreateRuinedTerrain();157 158 // 2. Setup dramatic lighting159 LightingSetup.CreateDramaticLighting(Color.gray * 0.3f);160 161 // 3. Add fog and post-processing162 PostProcessingSetup.CreateAtmosphericFog();163 164 // 4. Scatter debris and props165 EnvironmentPainter.ScatterDebris(50);166 167 // 5. Create player168 var player = PlayerSetup.CreateFPSPlayer();169 player.transform.position = new Vector3(0, 5, 0);170}171```