Table of Contents

Class DecorBuilder

Namespace
S1MAPI.Building.Structural
Assembly
S1MAPI_Mono.dll

Creates decorative building elements like trim, pillars, and foundations. Extracted from SemanticBuildingBuilder for SRP compliance.

public sealed class DecorBuilder
Inheritance
DecorBuilder
Inherited Members

Constructors

DecorBuilder(Transform, Vector3, BuildingPalette)

Create a new decor builder.

public DecorBuilder(Transform parent, Vector3 roomSize, BuildingPalette palette)

Parameters

parent Transform

Parent transform for decor elements

roomSize Vector3

Room dimensions

palette BuildingPalette

Material and color palette

Methods

AddBaseMolding(float, float, Material?, WallOpening?, WallOpening?, WallOpening?, WallOpening?, IEnumerable<WallSide>?)

Add base molding around the bottom of the building. Automatically gaps around door openings so the molding does not clip through door frames.

public GameObject AddBaseMolding(float height = 0.3, float depth = 0.1, Material? material = null, WallOpening? northOpening = null, WallOpening? southOpening = null, WallOpening? eastOpening = null, WallOpening? westOpening = null, IEnumerable<WallSide>? skipWalls = null)

Parameters

height float

Molding height in meters

depth float

Molding depth in meters

material Material

Optional material override

northOpening WallOpening

North wall opening (doors create a gap)

southOpening WallOpening

South wall opening (doors create a gap)

eastOpening WallOpening

East wall opening (doors create a gap)

westOpening WallOpening

West wall opening (doors create a gap)

skipWalls IEnumerable<WallSide>

Wall sides to omit molding from (null = include all walls)

Returns

GameObject

The molding container GameObject

AddCeiling(float)

Add ceiling to the room. The ceiling's top surface is flush with the top of the walls (_roomSize.y), so roof slabs placed at _roomSize.y sit directly on top with no overlap.

public GameObject AddCeiling(float thickness = 0.1)

Parameters

thickness float

Ceiling thickness in meters

Returns

GameObject

The ceiling GameObject

AddCornerPillars(float, Material?)

Add structural pillars at the four corners of the building.

public GameObject AddCornerPillars(float width = 0.4, Material? material = null)

Parameters

width float

Pillar width in meters

material Material

Optional material override

Returns

GameObject

The pillars container GameObject

AddCornerTrim(float, float, Material?)

Add thin vertical trim strips at the four corners of the building. Each corner gets two perpendicular strips forming a right angle, matching the depth and style of horizontal trims (AddRoofTrim(float, Material?), AddBaseMolding(float, float, Material?, WallOpening?, WallOpening?, WallOpening?, WallOpening?, IEnumerable<WallSide>?)). Runs the full wall height so it looks good with or without horizontal trim.

public GameObject AddCornerTrim(float width = 0.3, float depth = 0.1, Material? material = null)

Parameters

width float

Visible width of each trim strip on the wall face in meters

depth float

How far the trim protrudes past the wall surface in meters

material Material

Optional material override

Returns

GameObject

The corner trim container GameObject

AddDoorFrames(WallOpening?, WallOpening?, WallOpening?, WallOpening?, Material?)

Add trim-style door frames (left jamb, right jamb, header) around door openings. Frames use palette trim color/material and protrude slightly past the wall surface.

public GameObject AddDoorFrames(WallOpening? northOpening = null, WallOpening? southOpening = null, WallOpening? eastOpening = null, WallOpening? westOpening = null, Material? material = null)

Parameters

northOpening WallOpening

North wall opening

southOpening WallOpening

South wall opening

eastOpening WallOpening

East wall opening

westOpening WallOpening

West wall opening

material Material

Optional material override

Returns

GameObject

The door frames container GameObject

AddFloor(float)

Add floor to the room.

public GameObject AddFloor(float thickness = 0.1)

Parameters

thickness float

Floor thickness in meters

Returns

GameObject

The floor GameObject

AddFoundation(float, float, float, Color?, Material?)

Add a solid foundation block beneath the building.

public GameObject AddFoundation(float height = 2, float expandX = 0, float expandZ = 0, Color? color = null, Material? material = null)

Parameters

height float

Depth of the foundation in meters

expandX float

Extra width expansion beyond room bounds

expandZ float

Extra depth expansion beyond room bounds

color Color?

Optional color override

material Material

Optional material override

Returns

GameObject

The foundation GameObject

AddInteriorDoorFrames(IReadOnlyList<DoorwayInfo>, float, float, Material?)

Add trim-style door frames around interior doorway openings. Uses DoorwayInfo recorded by InteriorWallBuilder.

public GameObject AddInteriorDoorFrames(IReadOnlyList<DoorwayInfo> doorways, float frameWidth = 0.12, float frameProtrusion = 0.04, Material? material = null)

Parameters

doorways IReadOnlyList<DoorwayInfo>

Interior doorway positions and dimensions

frameWidth float

Width of the frame casing in meters

frameProtrusion float

How far the frame extends past the wall surface

material Material

Optional material override (defaults to palette trim material)

Returns

GameObject

The interior door frames container GameObject

AddRoofTrim(float, Material?)

Add decorative trim around the top of the building.

public GameObject AddRoofTrim(float height = 0.3, Material? material = null)

Parameters

height float

Height of the trim in meters

material Material

Optional material override

Returns

GameObject

The trim container GameObject

AddSecondaryRoofTrim(float, Material?)

Add a secondary trim above the main roof trim (parapet style).

public GameObject AddSecondaryRoofTrim(float height = 0.15, Material? material = null)

Parameters

height float

Height of the trim in meters

material Material

Optional material override

Returns

GameObject

The trim container GameObject

AddStairs(WallSide, float, float, float, float, Color?, Material?, StairStyle, bool, float, float)

Add stairs from ground level up to the building floor on the specified wall. Supports multiple visual styles: Solid (concrete box steps), ClosedRiser (two-tone wood with risers), or OpenStringer (plank treads on diagonal stringer beams).

public GameObject AddStairs(WallSide wall, float foundationHeight, float maxStepHeight = 0.2, float width = 2.5, float stepDepth = 0.3, Color? color = null, Material? material = null, StairStyle style = StairStyle.Solid, bool flushWithFloor = false, float gap = 0, float lateralOffset = 0)

Parameters

wall WallSide

Which wall the stairs attach to

foundationHeight float

Height of the foundation in meters

maxStepHeight float

Maximum height per step. Lower values create more, shallower steps. (Solid only)

width float

Step width in meters (Solid only)

stepDepth float

Step depth (tread) in meters. Controls how far stairs extend outward. (Solid only)

color Color?

Optional color override — defaults to floor color (Solid only)

material Material

Optional material override — defaults to floor material (Solid only)

style StairStyle

Visual style of stairs to generate

flushWithFloor bool

If true, topmost step is flush with floor level. If false (default), topmost step is one step below floor. (Solid only)

gap float

Vertical gap between foundation edge and top step. ClosedRiser/OpenStringer default to 0 (flush).

lateralOffset float

Lateral offset from wall center to align stairs with an offset door opening.

Returns

GameObject

The stairs container GameObject