vedaloivdocs

Guide

Decoration and Themes

Documentation for v1.1.0Unity 6000.5.0+Built-in · URP · HDRP

A theme tells the generator which prefab to use for each part of a room: floors, walls, doors, ceilings, and stairs. A decoration profile fills the room with furniture, props, and clutter by rule, not by hand.

On this page
  1. Themes
  2. Dungeon Theme Wizard
  3. Decoration profiles
  4. Objects mode
  5. Decoration at runtime
  6. Common mistakes

Themes#

Create a theme with Assets › Create › DungeonGen › DungeonTheme in your content folder. The theme maps each tile type to a prefab family. A family can be empty: if no ceiling prefabs are set, the renderer creates no ceilings.

tileSize float default 1
Size of one grid cell in meters. Match it to your modules. Rooms saved from the theme copy this value.
floorHeight float default 3
Height of one floor in meters.
wallThickness float default 0.25
Wall thickness in meters.
doubleSidedWalls bool default off
The wall kit looks right from both sides. Rooms saved from the theme can then share walls at seams. See Wall mode.
doubleSidedCeilings bool default off
The floor slab above is also the ceiling. Keep the ceiling prefab list empty when you turn this on.
pivot Corner or Center default Center
Where the pivot of each module sits in its cell.
Prefab families
floorPrefabs, wallPrefabs, doorPrefabs, corridorFloorPrefabs, corridorWallPrefabs, holePrefabs, ceilingPrefabs, and stairPrefabs. Each entry sets the prefab, its size in cells, an offset, a rotation, and whether it may rotate.
stairProfile StairProfile
The stair shape: its assembly mode, its length, back length, and width, and the pieces that make up the stair.

Dungeon Theme Wizard#

The wizard measures your prefabs and proposes sizes and offsets. Open Tools › DungeonGen › Dungeon Theme Wizard.

  1. Pick a theme in Source, or click Create New Theme. Click Reload to reread the theme from disk.

  2. In Grid, click Detect Tile Size From Floors and, if the stairs need it, Detect Floor Height From Walls. Turn on Double-Sided Walls if your kit needs it.

  3. Click Analyze All. Each row then shows a proposal. Apply only the proposals that match your kit with Use Proposal.

  4. Check the Floors, Walls & Doors, Corridors, Ceilings, and Stairs cards for each family.

    Dungeon Theme Wizard with no theme selected. The Source section offers Create New Theme and Reload, and the steps Grid, Floors, Walls and Doors, Corridors, Ceilings, Stairs, and Preview and Apply are listed below it.
    Select or create a theme first. Every later step works on that theme.
  5. Open Preview & Apply and check the seams in the preview. Click Apply to save the changes to the theme, or Cancel to discard them. Until you apply, the wizard only edits a temporary copy.

Decoration profiles#

A DecorationProfile is an ordered list of categories. Create one with Assets › Create › DungeonGen › Decoration Profile. Each category places one kind of object:

priority 0–100 default 50
Higher priority is placed first. Relations between categories can change the order.
pool list
The prefabs to pick from. Each entry has a weight (default 1), an optional maxUses (0 means unlimited), and optional overrides for position, rotation, scale, footprint, padding, and orientation.
amountMode Fixed, Range, or Density default Range
How many objects to place: exactly minCount, a random count between minCount and maxCount (default 1 to 3), or a density per square meter.
surface Floor, Wall, or Ceiling default Floor
Where objects go. Wall and ceiling objects are mounted automatically.
region Anywhere, Edge, Interior, Corner, or Center default Anywhere
Which part of the room to use. Interior keeps interiorWallCells (default 2) cells away from walls.
wallRegion AnyWall, StraightWall, NearCorner, AwayFromCorner, NearDoor, or AwayFromDoor default AnyWall
For wall objects: which part of the wall to use.
occupancy Solid, GroundOverlay, WallMounted, CeilingMounted, or NonBlocking default Solid
Solid objects block paths and collide with other decoration. Non-blocking objects, such as rugs, can overlap.
orientation OrientationMode default Random
How objects turn: random, cardinal (0, 90, 180, 270 degrees), fixed, aligned to the surface, or facing the nearest wall, the room center, or another category.
distribution Natural, Even, or Clustered default Natural
How objects spread across the candidate cells.
floorScope All, Specific, Range, Bottom, or Top default All
Which floors of a multi-floor room receive the category.
preservePaths bool default on
Keeps paths between doors open. minimumPathWidth (default 1 m) sets the width that must stay clear.
fitMode Fixed or AutoFit default Fixed
AutoFit moves the object so its back touches the wall, ceiling, or nearest wall, leaving fitMargin (default 0.02 m), and corrects by at most fitMaxCorrection (default 1 m).
relations list
Rules between categories: Avoid, PreferNear, or RequireNear, with a distance in meters (default 1).
sameCategoryCellGap, doorDistanceCells, stairDistanceCells int default 1 each
Minimum gap in cells between objects of this category, and between objects and doors or stairs.
footprintPadding float default 0.1
Extra space in meters kept around each object's footprint.
failurePolicy AllowPartial, RequireMinimum, or RequireExact default AllowPartial
What happens when the target count cannot be reached. AllowPartial keeps the objects that fit. RequireMinimum removes the whole category from the room when fewer than minCount fit. RequireExact removes it unless exactly the target count fits.
enabled bool default on
Turns the category off without deleting it.

Decoration is deterministic. The same seed gives the same result. Each category has its own seed offset, so you can reroll one category without changing the others.

Objects mode#

Switch the Room Designer to Objects to edit the profile for the current room.

  • Profile selects the profile. Seed & Randomness sets the seed (default 12345); tick Random for a new seed each time.
  • Rebake All Footprints measures each object's footprint again. Save Prefab does this for you, but it helps when you change an object.
  • Spawn All, Respawn All, and Despawn All place, redo, and remove the decoration in the scene view. The canvas toolbar has the same actions as Spawn, Respawn, and Despawn.
  • + Add, Duplicate, and Delete manage categories.
  • Left-click a cell to add a manual pin, which places an object on that cell first. Right-click a pin to remove it. Pins are stored in the profile, so every room that uses the profile gets them.
  • Bake Decor decides how Save Prefab handles the furniture. See Save a room prefab.

Decoration at runtime#

A room prefab with a RoomDecorationAuthoring component can be decorated at runtime. Save Prefab adds this component. It stores the room geometry, the profile, and the seed.

When DungeonManager.decorateAfterGeneration is on (the default), the manager decorates each generated room that has the component. The same solver runs in the editor preview and at runtime, so the result you see while editing is the result in play mode.

  • To rebuild the decoration of one category at runtime, call RerollCategory on the room's RoomDecorationAuthoring. Each call picks a new result for that category.
  • If Bake Decor was on when the prefab was saved, the furniture is already in the prefab, and the runtime skips the room.

Common mistakes#

  • Decoration does not appear. Check that the room prefab has RoomDecorationAuthoring and that decorateAfterGeneration is on. Then check the category's failure policy, because RequireMinimum and RequireExact drop the category when its count is not reached.
  • Pins appear in every room. Pins belong to the profile. Use a separate profile for rooms that need different pins.
  • Doors blocked by furniture. Keep preservePaths on, and raise minimumPathWidth if the paths are still too narrow.