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
parentTransformParent transform for decor elements
roomSizeVector3Room dimensions
paletteBuildingPaletteMaterial 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
heightfloatMolding height in meters
depthfloatMolding depth in meters
materialMaterialOptional material override
northOpeningWallOpeningNorth wall opening (doors create a gap)
southOpeningWallOpeningSouth wall opening (doors create a gap)
eastOpeningWallOpeningEast wall opening (doors create a gap)
westOpeningWallOpeningWest wall opening (doors create a gap)
skipWallsIEnumerable<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
thicknessfloatCeiling 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
widthfloatPillar width in meters
materialMaterialOptional 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
widthfloatVisible width of each trim strip on the wall face in meters
depthfloatHow far the trim protrudes past the wall surface in meters
materialMaterialOptional 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
northOpeningWallOpeningNorth wall opening
southOpeningWallOpeningSouth wall opening
eastOpeningWallOpeningEast wall opening
westOpeningWallOpeningWest wall opening
materialMaterialOptional material override
Returns
- GameObject
The door frames container GameObject
AddFloor(float)
Add floor to the room.
public GameObject AddFloor(float thickness = 0.1)
Parameters
thicknessfloatFloor 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
heightfloatDepth of the foundation in meters
expandXfloatExtra width expansion beyond room bounds
expandZfloatExtra depth expansion beyond room bounds
colorColor?Optional color override
materialMaterialOptional 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
doorwaysIReadOnlyList<DoorwayInfo>Interior doorway positions and dimensions
frameWidthfloatWidth of the frame casing in meters
frameProtrusionfloatHow far the frame extends past the wall surface
materialMaterialOptional 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
heightfloatHeight of the trim in meters
materialMaterialOptional 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
heightfloatHeight of the trim in meters
materialMaterialOptional 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
wallWallSideWhich wall the stairs attach to
foundationHeightfloatHeight of the foundation in meters
maxStepHeightfloatMaximum height per step. Lower values create more, shallower steps. (Solid only)
widthfloatStep width in meters (Solid only)
stepDepthfloatStep depth (tread) in meters. Controls how far stairs extend outward. (Solid only)
colorColor?Optional color override — defaults to floor color (Solid only)
materialMaterialOptional material override — defaults to floor material (Solid only)
styleStairStyleVisual style of stairs to generate
flushWithFloorboolIf true, topmost step is flush with floor level. If false (default), topmost step is one step below floor. (Solid only)
gapfloatVertical gap between foundation edge and top step. ClosedRiser/OpenStringer default to 0 (flush).
lateralOffsetfloatLateral offset from wall center to align stairs with an offset door opening.
Returns
- GameObject
The stairs container GameObject