Table of Contents

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

parent Transform

Parent transform for lights

roomSize Vector3

Room dimensions for light placement

palette BuildingPalette

Material and color palette

Methods

AddAmbientLighting(float)

Add ambient lighting to the room (lower intensity fill lights).

public GameObject AddAmbientLighting(float intensity = 0.3)

Parameters

intensity float

Base 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

intensity float?

Light intensity override (uses palette if null)

color Color?

Light color override (uses palette if null)

spacing float

Approximate 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

position Vector3

Local position for the light

intensity float

Light intensity

color Color?

Light color

range float

Light range in meters

includeFixture bool

Whether to add a visual fixture

Returns

GameObject

The light GameObject