Create varied low-poly buildings in the Editor or at runtime. Bake prefabs with auto-extracted meshes or spawn memory-safe variants during gameplay. Highly optimized for background city propsThe 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 WorkflowsThe Editor Pipeline & Live PreviewDesigning 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 SafetyGenerating 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 CapabilitiesThe 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 & LimitationsTo 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 ToolsIf 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 StartedRequirements: 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 DevelopmentAs 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!Requirements & CompatibilityMinimum Unity Version: Unity 6 or newer.Render Pipelines: The included demo materials are configured for URP (Simple Lit). Using HDRP requires manually changing the material shaders. The built-in legacy render pipeline might not be compatible.Dependencies: None. The asset uses native Unity libraries and requires no external packages.Core SystemsData-Driven: Generation is controlled by ScriptableObjects (BuildingProfile for specific buildings, BuildingFamilyProfile for randomized probability weights).Asset Baking: The Editor workflow extracts generated meshes (.asset) and materials (.mat) into organized companion folders to prevent project bloat.Clean Prefabs: Baked prefabs use only standard Unity components (MeshFilter, MeshRenderer, BoxCollider). Generation scripts can be safely excluded from your final build if you only use the Editor tools.Code Architecture: Cleanly organized under the Veridian.BuildingSystem namespace, separating runtime math from Editor assembly for easy integration into your own custom pipeline tools.Generated OutputsMeshes: Orthogonal low-poly procedural meshes capable of creating Rectangular, L, T, U, and H footprints.Decals: Windows, doors, and trims are generated as floating planar decals, utilizing a customizable detail offset bias to prevent Z-fighting rendering artifacts.Material Slots: Buildings utilize multiple material indices (walls, roof, glass, masonry, etc.). Note: Material atlasing for heavy draw-call optimization is not handled natively.LODs: Automated LODGroup setup with up to 3 Levels of Detail based on customizable screen-size transitions.Physics: Automatically calculates and assigns primitive BoxCollider components for the foundation, main body, and roof structure.Runtime API & Memory ManagementRuntime Generation: Includes a specific API (BuildingFactory.GenerateAtRuntime) designed to capture instantiated unmanaged assets for in-game use.Memory Tracking: Utilizes a RuntimeBuildingTracker component. When attached to a runtime-generated building, it intercepts GameObject destruction to safely flush dynamically generated unmanaged meshes and fallback materials from RAM and the GPU, natively preventing memory leaks.Note: Some demo textures were created using AI for demonstration purposes only. They are entirely optional, not required for the generator to function, and can be safely deleted.




