Table of Contents

Class BuildingPartRegistry

Namespace
S1MAPI.Building
Assembly
S1MAPI_Mono.dll

Post-build registry that tracks building parts by category. Attached to the building root during construction by BuildingBuilder. Consumers use this to target specific parts (all exterior walls, just the north wall, the floor, trim, etc.) and get their renderers for material swaps.

public sealed class BuildingPartRegistry
Inheritance
BuildingPartRegistry
Inherited Members

Constructors

BuildingPartRegistry()

public BuildingPartRegistry()

Methods

GetParts(BuildingPart)

Get all GameObjects for a building part category.

public GameObject[] GetParts(BuildingPart part)

Parameters

part BuildingPart

The building part category to query.

Returns

GameObject[]

GetParts(WallSide)

Get all GameObjects for a specific wall direction.

public GameObject[] GetParts(WallSide side)

Parameters

side WallSide

The specific wall side to query.

Returns

GameObject[]

GetRenderers(BuildingPart)

Get all renderers for a building part category.

public Renderer[] GetRenderers(BuildingPart part)

Parameters

part BuildingPart

The building part category to query.

Returns

Renderer[]

GetRenderers(WallSide)

Get all renderers for a specific wall direction.

public Renderer[] GetRenderers(WallSide side)

Parameters

side WallSide

The specific wall side to query.

Returns

Renderer[]

SetExteriorWallMaterial(Material)

Set the exterior face material on all exterior wall renderers (submesh 0). Only affects dual-material walls created with InteriorWallMaterial. Single-material walls are updated normally.

public void SetExteriorWallMaterial(Material material)

Parameters

material Material

The material to apply to exterior faces.

SetInteriorFaceMaterial(Material)

Set the interior (room-facing) material on all exterior wall renderers (submesh 1). Only affects dual-material walls. Renderers with a single material are skipped.

public void SetInteriorFaceMaterial(Material material)

Parameters

material Material

The material to apply to interior faces.

SetMaterial(BuildingPart, Material)

Set the material on all renderers for a building part category.

public void SetMaterial(BuildingPart part, Material material)

Parameters

part BuildingPart

The building part category to modify.

material Material

The material to apply.

SetMaterial(BuildingPart, Material, int)

Set the material on a specific submesh index across all renderers for a building part. Use submesh 0 for exterior faces, submesh 1 for interior faces on dual-material walls. Renderers with fewer submeshes than submeshIndex are skipped.

public void SetMaterial(BuildingPart part, Material material, int submeshIndex)

Parameters

part BuildingPart

The building part category to modify.

material Material

The material to apply.

submeshIndex int

The submesh index to target (0 = exterior, 1 = interior).

SetMaterial(WallSide, Material)

Set the material on all renderers for a specific wall direction.

public void SetMaterial(WallSide side, Material material)

Parameters

side WallSide

The specific wall side to modify.

material Material

The material to apply.

SetMaterial(WallSide, Material, int)

Set the material on a specific submesh index across all renderers for a wall direction. Use submesh 0 for exterior faces, submesh 1 for interior faces on dual-material walls. Renderers with fewer submeshes than submeshIndex are skipped.

public void SetMaterial(WallSide side, Material material, int submeshIndex)

Parameters

side WallSide

The specific wall side to modify.

material Material

The material to apply.

submeshIndex int

The submesh index to target (0 = exterior, 1 = interior).