Class LightingBuilder
- Namespace
- S1MAPI.Building.Components
- Assembly
- S1MAPI_Mono.dll
Creates lighting for buildings. Extracted from SemanticBuildingBuilder for SRP compliance.
public sealed class LightingBuilder
- Inheritance
-
LightingBuilder
- Inherited Members
Constructors
LightingBuilder(Transform, Vector3, BuildingPalette)
Create a new lighting builder.
public LightingBuilder(Transform parent, Vector3 roomSize, BuildingPalette palette)
Parameters
parentTransformParent transform for lights
roomSizeVector3Room dimensions for light placement
paletteBuildingPaletteMaterial and color palette
Methods
AddAmbientLighting(float)
Add ambient lighting to the room (lower intensity fill lights).
public GameObject AddAmbientLighting(float intensity = 0.3)
Parameters
intensityfloatBase intensity for ambient lights
Returns
- GameObject
The ambient lights container
AddCeilingLights(float?, Color?, float)
Add ceiling lights distributed across the room. Places lights in a grid pattern based on room size.
public GameObject AddCeilingLights(float? intensity = null, Color? color = null, float spacing = 4)
Parameters
intensityfloat?Light intensity override (uses palette if null)
colorColor?Light color override (uses palette if null)
spacingfloatApproximate spacing between lights in meters
Returns
- GameObject
The lights container GameObject
AddPointLight(Vector3, float, Color?, float, bool)
Add a single point light at a specific position.
public GameObject AddPointLight(Vector3 position, float intensity = 1, Color? color = null, float range = 8, bool includeFixture = true)
Parameters
positionVector3Local position for the light
intensityfloatLight intensity
colorColor?Light color
rangefloatLight range in meters
includeFixtureboolWhether to add a visual fixture
Returns
- GameObject
The light GameObject