Credential Fixture Review
python scripts/_api_config.py is review material for the Unity Level Design skill. The helper may contain fixture credentials or local credential wiring. Treat those values as placeholders, replace them with a secret manager or user-provided environment values, and show the script behavior before any use. Do not contact external services with embedded sample credentials.
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-23description: 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---56789### Credential Fixture Review1011`python scripts/_api_config.py` is review material for the `Unity Level Design` skill. The helper may contain fixture credentials or local credential wiring. Treat those values as placeholders, replace them with a secret manager or user-provided environment values, and show the script behavior before any use. Do not contact external services with embedded sample credentials.1213# Unity Level Design1415## Overview1617Rapidly 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.1819## When to Use2021Use this skill when:22- Creating prototype scenes (post-apocalypse, fantasy, sci-fi, dungeon crawler, etc.)23- Setting up Unity terrain, meshes, and ground geometry24- Automating lighting, post-processing, and environment setup25- Building player controllers and basic gameplay systems26- Need to go from concept to playable scene rapidly2728## Core Workflow2930### Step 1: Research Current APIs3132Before implementing, check Unity's latest APIs and best practices:3334**Modern Unity Systems:**35- Terrain Tools package (GPU-accelerated sculpting)36- Universal Render Pipeline (URP) or High Definition Render Pipeline (HDRP)37- DOTS/ECS for performance-critical scenarios38- Shader Graph for custom materials39- VFX Graph for particle effects4041**Key APIs to reference:**42- `UnityEngine.Terrain` - Terrain manipulation43- `UnityEditor.TerrainTools` - Editor terrain tools44- `UnityEngine.Rendering.Universal` - URP components45- `UnityEditor.SceneManagement` - Scene automation4647### Step 2: Scene Setup Automation4849Use Editor scripts to automate repetitive setup:5051```csharp52// Example: Automated scene initialization53public static class SceneSetupHelper54{55 [MenuItem("Level Design/Create Basic Scene")]56 public static void CreateBasicScene()57 {58 // Setup lighting59 SetupLighting();60 61 // Create terrain62 CreateTerrain();63 64 // Setup post-processing65 SetupPostProcessing();66 67 // Create player68 CreatePlayerController();69 }70}71```7273### Step 3: Terrain Generation7475**Options:**761. **Unity Terrain** - Best for natural landscapes772. **Mesh Generation** - Best for stylized/architectural783. **Procedural Generation** - Best for endless/replayable worlds7980### Step 4: Environment & Props8182Automate placement of:83- Vegetation (trees, grass, rocks)84- Structures (buildings, ruins, dungeons)85- Lighting (sun, ambient, point lights)86- Effects (fog, particles, post-processing)8788### Step 5: Player & Gameplay8990Create basic:91- Player controller (FPS, third-person, top-down)92- Camera setup93- Input handling94- Basic interactions9596## Scene Types9798### Post-Apocalyptic Scene99- Destroyed urban environment100- Ruined buildings and debris101- Overgrown vegetation102- Atmospheric fog and lighting103- Scattered resources/props104105### Fantasy Forest106- Dense woodland terrain107- Rivers and lakes108- Fantasy vegetation109- Magical lighting effects110- Pathways and clearings111112### Dungeon Crawler113- Procedural room generation114- Corridor systems115- Torch/candle lighting116- Traps and enemy spawners117- Loot chests118119## Quick Reference120121| Task | Method | API/Tool |122|------|--------|----------|123| Create Terrain | Editor script | `Terrain.CreateTerrainGameObject` |124| Sculpt Terrain | Noise/heightmaps | `TerrainData.SetHeights` |125| Add Vegetation | Tree/Grass painting | `TerrainData.treeInstances` |126| Setup Lighting | URP/HDRP | `UniversalAdditionalLightData` |127| Post-Processing | Volume components | `Volume` + profiles |128| Player Controller | Character Controller | `CharacterController` component |129| Procedural Meshes | Runtime generation | `Mesh` class |130131## Editor Tools132133See `scripts/` for automation tools:134- `SceneSetupWizard.cs` - One-click scene initialization135- `TerrainGenerator.cs` - Procedural terrain creation136- `EnvironmentPainter.cs` - Batch environment placement137- `LightingSetup.cs` - Automated lighting configuration138139## References140141See `references/` for detailed documentation:142- `unity-apis.md` - Current Unity API reference143- `terrain-tools.md` - Terrain system documentation144- `urp-setup.md` - Universal Render Pipeline guide145- `level-design-patterns.md` - Best practices and patterns146147## Common Mistakes148149- **Wrong render pipeline**: Check if project uses URP, HDRP, or Built-in RP150- **Terrain scale**: Unity terrain uses different height/length scales151- **Lighting baking**: Realtime GI can be slow; use baked lighting for static geometry152- **Performance**: Too many trees/colliders will kill performance153- **Scale consistency**: Keep player, environment, and props to consistent scale154155## Example Usage156157```csharp158// Create a post-apocalyptic scene159[MenuItem("Level Design/Post-Apocalyptic Scene")]160static void CreatePostApocalypticScene()161{162 // 1. Create terrain with noise163 var terrain = TerrainGenerator.CreateRuinedTerrain();164 165 // 2. Setup dramatic lighting166 LightingSetup.CreateDramaticLighting(Color.gray * 0.3f);167 168 // 3. Add fog and post-processing169 PostProcessingSetup.CreateAtmosphericFog();170 171 // 4. Scatter debris and props172 EnvironmentPainter.ScatterDebris(50);173 174 // 5. Create player175 var player = PlayerSetup.CreateFPSPlayer();176 player.transform.position = new Vector3(0, 5, 0);177}178```