Overview
The Procedural Building Builder is a profile-driven generation tool designed to rapidly construct low-poly buildings directly in the Unity Editor or dynamically at runtime.
Built specifically for populating background and mid-ground environments, this system is an ideal solution for city builders, flight simulators, or any project that requires a massive volume of structural variety without the overhead of manually modeling dozens of unique architectural assets.
Instead of hand-placing vertices, you drive the generation using a non-destructive parameter system. By utilizing two distinct data profiles, you have complete control over how your structures are built:
- Building Profiles: A deterministic, static profile. The exact values you set here will generate one specific, repeatable building.
- Building Family Profiles: A dynamic profile defined by ranges and weighted probabilities. Instead of a single building, this defines an entire architectural style. With a single click, the generator will roll random values within your constraints to create thousands of unique, unpredictable permutations.
Core Workflows
The Editor Pipeline & Live Preview
Designing buildings in the Editor is highly visual. Assigning a profile instantly spawns a Live Preview in your scene. As you adjust sliders for width, floor counts, or roof pitch, the preview mesh updates in real-time. If you are using a Family Profile, a single "Re-roll" button lets you rapidly cycle through procedural outcomes until you find a structure you like.
When you are ready to commit, the Bake Prefab system automatically converts the temporary preview into a permanent project asset. To prevent your project directory from becoming bloated, the system intelligently extracts all procedural meshes and materials into a dedicated, cleanly named companion folder right next to your new prefab.
Runtime Generation & Memory Safety
Generating custom meshes during active gameplay traditionally risks severe memory leaks. To solve this, the included runtime API features a dedicated RuntimeBuildingTracker. When you generate a building on the fly, this component securely tracks all unmanaged procedural meshes and fallback materials. When the building's GameObject is eventually destroyed, the tracker intercepts the event and natively flushes the orphaned assets from your RAM and GPU.
Architectural Capabilities
The generator uses a strict orthogonal layout system to calculate clean, watertight geometry based on your parameters.
- Dynamic Footprints: Go beyond basic rectangles. By adjusting the Wing Extension and Mirrored Building parameters, the engine automatically calculates complex floor plans, allowing you to generate seamless L, T, U, and H-shaped structures.
- Intelligent Facades: Windows, doors, and trims are generated as planar decals. You simply define the target window count for each cardinal direction (Front, Back, Left, Right), and the engine automatically calculates the even spacing required to fit them. If a door is added, the system detects its placement and dynamically removes conflicting ground-floor windows.
- Complex Roof Calculations: Choose between Flat or Gabled roofs. For Gabled roofs on complex L or U-shaped footprints, the system automatically calculates the intersecting valley angles to ensure a continuous, enclosed roof mesh.
- Masonry & Details: Easily toggle physical 3D additions like foundations (with customizable ledge extensions), chimneys that automatically adjust to clear the slope of your roof, and front, back, or wing porches with physical columns.
- Automatic LODs: Buildings automatically generate with up to 3 Levels of Detail, allowing you to fine-tune screen-size transitions to maintain strict performance budgets in dense scenes.
System Constraints & Limitations
To ensure this tool fits your project's scope, it is important to understand its technical constraints. We want to be completely upfront so you know exactly what you are downloading:
- Exterior-Only Focus: These buildings are inherently low-poly and do not feature interiors, working doors, or detailed interior collision. The script generates primitive box colliders for the foundation, main body, and roof, making them perfectly suited for background scenery rather than close-up, physical interaction.
- Orthogonal Architecture: The generator mathematically calculates clean geometry using a strict orthogonal layout system. While it excels at standard rectangular, L, T, and U shapes, it cannot generate curved walls, cylinders, or arbitrary diagonal angles.
- Material Optimization: While the buildings automatically generate LODs for geometric optimization, they are not strictly optimized from a material standpoint out of the box. Each building utilizes multiple material slots (walls, roof, trim, etc.). If you plan to spawn hundreds of these structures in a single, dense environment, it is highly recommended that you use a separate material atlasing tool to combine textures and reduce draw calls.
Recommended Ecosystem & Workflow Tools
If you are using this generator to build large environments, there are several other assets available on my publisher page designed specifically to streamline that workflow:
- Procedural Towns (Free): Developed in tandem with this building generator, this procedural grid tool was used to create the road and lot layout you see in the included demo scene. It provides the perfect foundation for snapping these generated houses into cohesive neighborhoods.
- Veridian Imposters (Free): The highly optimized, flat imposter trees featured in the demo scene were created using this exact tool. It is an excellent, free resource for maintaining strict performance budgets when rendering expansive environments and forests.
- BurstLOD: If you need to generate runtime or editor-based LODs for the other heavy meshes in your project, this comprehensive LOD system is designed to process geometry at exceptionally fast speeds.
Compatibility & Getting Started
- Requirements: This asset requires Unity 6 or newer and is built with modern render pipelines in mind.
- The Demo Scene: The package includes a demo scene featuring a pre-generated town layout and a live runtime generation example. Note: The included demo materials are configured for the Universal Render Pipeline (URP). If you are using HDRP, you will need to manually change the shader on the demo materials for them to display properly.
- Clean Integration: Once you understand the profile workflow, you can safely delete the entire demo folder. Removing it will not break the core generation scripts, keeping your project file size completely clean.
Support the Development
As a solo developer, creating and sharing free tools takes a considerable amount of time and effort. If this asset speeds up your workflow, fits well into your project, or simply saves you a few hours of modeling, please consider taking a moment to leave a rating and a review on the Asset Store.
It is incredibly encouraging and helps these free tools gain visibility. Good luck with your project!