Unity Procedural Generation: Build Infinite Game Levels
Last updated: Oct 21 2025

About This Course
Learn to create infinite game levels using procedural generation in Unity. Code 3D dungeons, generate layouts, create a NavMesh, and fill them with enemies, loot, and decor—while levelling up your C# skills!
Instructors: GameDev.tv Team, Barbara Reichart
Course Features
- Create infinite game levels that feel fresh every playthrough
- Generate procedural dungeon layouts with rooms and hallways
- Turn 2D layouts into dynamic 3D levels with Marching Squares
- Implement a runtime NavMesh so players and NPCs can navigate
- Use Scriptable Objects to customize layouts without extra code
- Populate dungeons with treasure, enemies, and decorations
- Apply rule-based systems to avoid repetitive level design
- Master advanced C# techniques to optimize procedural systems
What You'll Learn
- Create infinite game levels that feel fresh every playthrough
- Generate procedural dungeon layouts with rooms and hallways
- Turn 2D layouts into dynamic 3D levels with Marching Squares
- Implement a runtime NavMesh so players and NPCs can navigate
- Use Scriptable Objects to customize layouts without extra code
- Populate dungeons with treasure, enemies, and decorations
- Apply rule-based systems to avoid repetitive level design
- Master advanced C# techniques to optimize procedural systems
Requirements
- Understanding of Unity's user interface, GameObjects and Prefabs
- Basic C# programming skills like classes, for loops and variables
Description
Want to make game levels using procedural generation? It's one of the most powerful ways to create infinite, dynamic game worlds without designing every single detail by hand.
Learn how to code your own algorithms and build replayable levels that feel fresh every time! No more designing every corner—let the code do the heavy lifting!
You'll start by generating a dungeon layout with rooms and hallways. Using Scriptable Objects, you'll customize layouts effortlessly, making sure no two levels feel the same. Say goodbye to repetitive level design—your game world will evolve with every play-through.
Next, you'll turn your 2D layouts into a fully realised 3D game level. We'll harness the power of the Marching Squares algorithm to create detailed levels with only 16 tiles. If you're a solo dev or working with a small team, this trick will save you heaps of time and effort.
Navigation is key, so we'll dynamically generate a NavMesh at runtime. This means your player can seamlessly explore every new dungeon layout without breaking immersion. Whether you're building an RPG or a roguelike, this skill will come in handy!
But what's a dungeon without loot and baddies? Using a rule-based system, you'll populate your levels with treasure, enemies, and decorations. You'll also learn techniques to prevent everything from looking too repetitive—because variety keeps players engaged.
Along the way, we'll level up your C# skills with advanced concepts like lambda expressions, expression-bodied members, and System.Linq. If you've got the basics of C# down and want to push your coding skills further, you're in for a treat.
This course is perfect for anyone who knows their way around Unity's UI, GameObjects, and Prefabs. If you can handle loops, classes, and variables in C#, you're ready to level up your skills with procedural generation.
By the end of this course, you'll have a robust system for procedural level design, plus a sharper understanding of advanced C# concepts. Ready to apply these techniques to your own projects and build infinite game worlds? Let's dive in and start coding!
Target Audience
- Developers who know the basics of C# and Unity and want to learn advanced C# concepts to level up their coding skills
- Anyone who wants to learn about procedural generation approaches
Course Content
Introduction & Setup
- Welcome to The Course
- Setting Up The Project
- Intro To Proc Gen
- Community & Support
- Accessing Our Projects
Room Layout Generator
- Section Intro – Room Layout Gen
- Generate The First Room
- Draw Level on Texture2D
- Define Data Structures
- Stubs & Lambda Expressions
- Find All Exits
- Enums and Enum Extensions
- Expression-bodimed Members
- Pick Exit Using Linq
- Calculate Second Room Position
- Object Initializers
- Generate Multiple Rooms
- Validate Room Positions
- Work With Random Seeds
- Configure With Scriptable Objects
- Generate Different Room Sizes
- Limit Room Occurrences
- Add Special Rooms Textures
- Display Special Rooms
- Stub Method For Exit Detection
- Detect Exits On Texture
Generate Level Geometry
- Section Intro - Geometry Gen
- The ILevel Interface
- Implement Texture Based Level
- Marching Squares
- Create Tileset
- Create Level Geometry
- Implement a Singleton
- Share Data Using Singleton
- Add Variations With TileVariants
- Combine Generation: LevelBuilder
- Set Up NavMesh
- Set Player Start Position
- Point-And-Click To Move Player
- Animate Player
Decorate Rooms
- Section Intro - Decorate Rooms
- Set Up Room Decorator
- Create Decoration Texture
- Set Up Rule System
- Detect Patterns
- Create Pattern Rules in Unity
- Apply Rules to Texture
- Align Texture with Level
- Apply Rules to Level Geometry
- Center Pattern in Room
- Apply Multiple Rules In A Room
- Copy Arrays And Limit Rule Use
- Rotate Rules
- And Decorator Rule
- Or Decorator Rule
- The Noop TileType
- Create Prop Variations 1
- Create Prop Variations 2
- Create Prop Variations 3
- Working With EnumFlags
- Get Room Connectedness
- Assign Start and Exit Room
- Filtering with Linq
- Wrapup
Course Includes
- 11 hours on-demand video
- 9 downloadable resources
- Access on mobile and TV
- Certificate of completion
🚀Direct Download Link
Contact us on 💬WhatsApp for premium access and support.
Link: https://www.udemy.com/course/unity-procedural-generation/?couponCode=MT251020G2