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-design
3description: 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.
4metadata:
5 source: https://skillmd.com/skills/modbender/unity-level-design
6---
7
8# Unity Level Design
9
10## Overview
11
12Rapidly 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.
13
14## When to Use
15
16Use this skill when:
17- Creating prototype scenes (post-apocalypse, fantasy, sci-fi, dungeon crawler, etc.)
18- Setting up Unity terrain, meshes, and ground geometry
19- Automating lighting, post-processing, and environment setup
20- Building player controllers and basic gameplay systems
21- Need to go from concept to playable scene rapidly
22
23## Core Workflow
24
25### Step 1: Research Current APIs
26
27Before implementing, check Unity's latest APIs and best practices:
28
29**Modern Unity Systems:**
30- Terrain Tools package (GPU-accelerated sculpting)
31- Universal Render Pipeline (URP) or High Definition Render Pipeline (HDRP)
32- DOTS/ECS for performance-critical scenarios
33- Shader Graph for custom materials
34- VFX Graph for particle effects
35
36**Key APIs to reference:**
37- `UnityEngine.Terrain` - Terrain manipulation
38- `UnityEditor.TerrainTools` - Editor terrain tools
39- `UnityEngine.Rendering.Universal` - URP components
40- `UnityEditor.SceneManagement` - Scene automation
41
42### Step 2: Scene Setup Automation
43
44Use Editor scripts to automate repetitive setup:
45
46```csharp
47// Example: Automated scene initialization
48public static class SceneSetupHelper
49{
50 [MenuItem("Level Design/Create Basic Scene")]
51 public static void CreateBasicScene()
52 {
53 // Setup lighting
54 SetupLighting();
55
56 // Create terrain
57 CreateTerrain();
58
59 // Setup post-processing
60 SetupPostProcessing();
61
62 // Create player
63 CreatePlayerController();
64 }
65}
66```
67
68### Step 3: Terrain Generation
69
70**Options:**
711. **Unity Terrain** - Best for natural landscapes
722. **Mesh Generation** - Best for stylized/architectural
733. **Procedural Generation** - Best for endless/replayable worlds
74
75### Step 4: Environment & Props
76
77Automate placement of:
78- Vegetation (trees, grass, rocks)
79- Structures (buildings, ruins, dungeons)
80- Lighting (sun, ambient, point lights)
81- Effects (fog, particles, post-processing)
82
83### Step 5: Player & Gameplay
84
85Create basic:
86- Player controller (FPS, third-person, top-down)
87- Camera setup
88- Input handling
89- Basic interactions
90
91## Scene Types
92
93### Post-Apocalyptic Scene
94- Destroyed urban environment
95- Ruined buildings and debris
96- Overgrown vegetation
97- Atmospheric fog and lighting
98- Scattered resources/props
99
100### Fantasy Forest
101- Dense woodland terrain
102- Rivers and lakes
103- Fantasy vegetation
104- Magical lighting effects
105- Pathways and clearings
106
107### Dungeon Crawler
108- Procedural room generation
109- Corridor systems
110- Torch/candle lighting
111- Traps and enemy spawners
112- Loot chests
113
114## Quick Reference
115
116| Task | Method | API/Tool |
117|------|--------|----------|
118| Create Terrain | Editor script | `Terrain.CreateTerrainGameObject` |
119| Sculpt Terrain | Noise/heightmaps | `TerrainData.SetHeights` |
120| Add Vegetation | Tree/Grass painting | `TerrainData.treeInstances` |
121| Setup Lighting | URP/HDRP | `UniversalAdditionalLightData` |
122| Post-Processing | Volume components | `Volume` + profiles |
123| Player Controller | Character Controller | `CharacterController` component |
124| Procedural Meshes | Runtime generation | `Mesh` class |
125
126## Editor Tools
127
128See `scripts/` for automation tools:
129- `SceneSetupWizard.cs` - One-click scene initialization
130- `TerrainGenerator.cs` - Procedural terrain creation
131- `EnvironmentPainter.cs` - Batch environment placement
132- `LightingSetup.cs` - Automated lighting configuration
133
134## References
135
136See `references/` for detailed documentation:
137- `unity-apis.md` - Current Unity API reference
138- `terrain-tools.md` - Terrain system documentation
139- `urp-setup.md` - Universal Render Pipeline guide
140- `level-design-patterns.md` - Best practices and patterns
141
142## Common Mistakes
143
144- **Wrong render pipeline**: Check if project uses URP, HDRP, or Built-in RP
145- **Terrain scale**: Unity terrain uses different height/length scales
146- **Lighting baking**: Realtime GI can be slow; use baked lighting for static geometry
147- **Performance**: Too many trees/colliders will kill performance
148- **Scale consistency**: Keep player, environment, and props to consistent scale
149
150## Example Usage
151
152```csharp
153// Create a post-apocalyptic scene
154[MenuItem("Level Design/Post-Apocalyptic Scene")]
155static void CreatePostApocalypticScene()
156{
157 // 1. Create terrain with noise
158 var terrain = TerrainGenerator.CreateRuinedTerrain();
159
160 // 2. Setup dramatic lighting
161 LightingSetup.CreateDramaticLighting(Color.gray * 0.3f);
162
163 // 3. Add fog and post-processing
164 PostProcessingSetup.CreateAtmosphericFog();
165
166 // 4. Scatter debris and props
167 EnvironmentPainter.ScatterDebris(50);
168
169 // 5. Create player
170 var player = PlayerSetup.CreateFPSPlayer();
171 player.transform.position = new Vector3(0, 5, 0);
172}
173```