How to create a procedural house¶
There are two ways to create a procedural house.
- Open the Domik folder
- Select House Example prefab
- Drag-n-Drop it on the scene.
- Select it on the scene
- Click Generate From Random button in the Inspector.
- Create new gameobject in the scene.
- Add a House Generator component to it.
- Select a Regular House pipeline in the pipeline property in the House Generator component.
- Set house sizes in the Base Size menu.
- Add a Regular Floor skin to the House Skins property.
- Add a Basement floor, FLEX Regular Floor and a Roof floors with correct order as it shows below.
- Click the Generate Random button.
You can duplicate it if you want.
- Select House Example Prefab in the Hierarchy.
- Press Ctrl-D to duplicate prefab instance in the scene.
- Change the position on duplicated house by dragging gizmo handle.
- Click Generate Random button to regenerate it.
- Repeat.
Click a Generate Random button again to randomize look of the house.