Uploaded August 2026 | Updated September 2026, 2 weeks ago
In this tutorial you will learn how to install Unity CLI and how to use it to build a complete 2D Procedural Dungeon generator using a FREE Unity 6 starter project.
๐ฆ FREE starter project:
patreon.com/sunnyvalleystudio/posts/free-project-2d-166653562
Learn more from my courses:
courses.sunnyvalleystudio.com
Unity CLI documentation:
docs.unity.com/en-us/unity-cli/use-unity-cli
Prompts:
drive.google.com/file/d/12UCZqRLfu9x50AXx6fgK3npSEooDf3Xj/view?usp=drive_link
Assets used:
o-lobster.itch.io/simple-dungeon-crawler-16x16-pixel-pack
---------------------------------------------------
โ๏ธ WHAT YOU WILL LEARN:
Installing, authenticating and configuring the Unity CLI
- Installing the com.unity.pipeline package so the CLI can drive a running Editor
- Connecting an AI agent (Claude Code, or Codex / ChatGPT) directly to your open project
- How procedural dungeon generation actually works โ random placement with rejection, and Prim's algorithm for connecting rooms with corridors
- Deriving walls, colliders and decorations from a single set of floor cells
- Spawning enemies, props and traps without anything overlapping
- Prompting and iteration strategies for AI-assisted Unity work โ including catching the things the AI gets wrong
ยทยทยทยทยท Get in touch ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
๐๐ฎ๐๐ฒ ๐ฎ๐ป๐ ๐พ๐๐ฒ๐๐๐ถ๐ผ๐ป๐? ๐๐ผ๐ถ๐ป ๐๐ต๐ฒ ๐ฑ๐ถ๐๐ฐ๐ผ๐ฟ๐ฑ!
discord.gg/RQEtYHz
๐ฃ๐๐๐๐ฆ๐ support the channel:
patreon.com/sunnyvalleystudio
---------------------------------------------------
โฑ๏ธ CHAPTERS:
0:00 Why procedural generation is so much work
0:44 Unity CLI vs Unity MCP
1:01 FREE Project
1:47 Installing the Unity CLI
2:19 Connecting the CLI to your project
2:50 Giving your AI agent the CLI
3:37 Saving what it learned & skipping permission prompts
4:16 How the dungeon algorithm works
5:31 The first prompt (plan mode)
7:15 Reviewing the plan
8:17 The rooms are generated
9:06 Too spread out โ packing them closer
9:37 Connecting rooms with corridors
10:28 The corridors break the walls
11:08 Wall decorations
11:56 Spawning enemies
12:48 Props & traps
13:34 Final result and where to go next
#unity #unitycli #gamedev #proceduralgeneration
In this tutorial you will learn how to install Unity CLI and how to use it to build a complete 2D Procedural Dungeon generator using a FREE Unity 6 starter project.
๐ฆ FREE starter project:
patreon.com/sunnyvalleystudio/posts/free-project-2d-166653562
Learn more from my courses:
courses.sunnyvalleystudio.com
Unity CLI documentation:
docs.unity.com/en-us/unity-cli/use-unity-cli
Prompts:
drive.google.com/file/d/12UCZqRLfu9x50AXx6fgK3npSEooDf3Xj/view?usp=drive_link
Assets used:
o-lobster.itch.io/simple-dungeon-crawler-16x16-pixel-pack
---------------------------------------------------
โ๏ธ WHAT YOU WILL LEARN:
Installing, authenticating and configuring the Unity CLI
- Installing the com.unity.pipeline package so the CLI can drive a running Editor
- Connecting an AI agent (Claude Code, or Codex / ChatGPT) directly to your open project
- How procedural dungeon generation actually works โ random placement with rejection, and Prim's algorithm for connecting rooms with corridors
- Deriving walls, colliders and decorations from a single set of floor cells
- Spawning enemies, props and traps without anything overlapping
- Prompting and iteration strategies for AI-assisted Unity work โ including catching the things the AI gets wrong
ยทยทยทยทยท Get in touch ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
๐๐ฎ๐๐ฒ ๐ฎ๐ป๐ ๐พ๐๐ฒ๐๐๐ถ๐ผ๐ป๐? ๐๐ผ๐ถ๐ป ๐๐ต๐ฒ ๐ฑ๐ถ๐๐ฐ๐ผ๐ฟ๐ฑ!
discord.gg/RQEtYHz
๐ฃ๐๐๐๐ฆ๐ support the channel:
patreon.com/sunnyvalleystudio
---------------------------------------------------
โฑ๏ธ CHAPTERS:
0:00 Why procedural generation is so much work
0:44 Unity CLI vs Unity MCP
1:01 FREE Project
1:47 Installing the Unity CLI
2:19 Connecting the CLI to your project
2:50 Giving your AI agent the CLI
3:37 Saving what it learned & skipping permission prompts
4:16 How the dungeon algorithm works
5:31 The first prompt (plan mode)
7:15 Reviewing the plan
8:17 The rooms are generated
9:06 Too spread out โ packing them closer
9:37 Connecting rooms with corridors
10:28 The corridors break the walls
11:08 Wall decorations
11:56 Spawning enemies
12:48 Props & traps
13:34 Final result and where to go next
#unity #unitycli #gamedev #proceduralgeneration










