Struct InstantiationResult
The collected output of a Build() call.
Every reference is null or empty when the corresponding stage was not enabled
via the matching WithX configuration call on the instantiator. Callers use
this struct to attach gameplay components (door behaviour, room fog-of-war, etc.) to
the spawned GameObjects.
Inherited Members
Namespace: Scylla.Core.Util.ProceduralMapGen
Assembly: ScyllaCore.dll
Syntax
public readonly struct InstantiationResult
Constructors
InstantiationResult(Transform, GameObject, GameObject, GameObject[], DoorPlacement[], IReadOnlyDictionary<SquareCoord, int>, ScyllaSquareGrid<int>)
Initializes a new InstantiationResult. Called internally by Build().
Declaration
public InstantiationResult(Transform root, GameObject floorMesh, GameObject ceilingPlane, GameObject[] walls, DoorPlacement[] doors, IReadOnlyDictionary<SquareCoord, int> cellToRoom, ScyllaSquareGrid<int> grid)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | root | |
| GameObject | floorMesh | |
| GameObject | ceilingPlane | |
| GameObject[] | walls | |
| DoorPlacement[] | doors | |
| IReadOnlyDictionary<SquareCoord, int> | cellToRoom | |
| ScyllaSquareGrid<int> | grid |
Fields
CeilingPlane
The single ceiling plane GameObject. null when no ceiling configuration was supplied.
Declaration
public readonly GameObject CeilingPlane
Field Value
| Type | Description |
|---|---|
| GameObject |
CellToRoom
Cell-to-room-ID lookup, derived from Rooms. null when WithCellToRoomMap() was not called. Cells outside any room (corridors, walls) are absent from the dictionary.
Declaration
public readonly IReadOnlyDictionary<SquareCoord, int> CellToRoom
Field Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<SquareCoord, int> |
Doors
One DoorPlacement per detected door cell. Empty array when no door configuration was supplied. The placement's GameObject is null when door detection ran in detection-only mode (no DoorShapeConfig attached).
Declaration
public readonly DoorPlacement[] Doors
Field Value
| Type | Description |
|---|---|
| DoorPlacement[] |
FloorMesh
The single merged-mesh GameObject built by the floor stage. null when no floor configuration was supplied.
Declaration
public readonly GameObject FloorMesh
Field Value
| Type | Description |
|---|---|
| GameObject |
Grid
The same grid passed to the instantiator constructor; the instantiator does not mutate it. Exposed for caller convenience so consumers don't need to keep a separate reference around.
Declaration
public readonly ScyllaSquareGrid<int> Grid
Field Value
| Type | Description |
|---|---|
| ScyllaSquareGrid<int> |
Root
The parent transform passed to WithRoot(Transform); all spawned GameObjects are children of this transform (directly or via per-stage child roots).
Declaration
public readonly Transform Root
Field Value
| Type | Description |
|---|---|
| Transform |
Walls
One GameObject per Wall cell. Empty array when no wall configuration was supplied.
Declaration
public readonly GameObject[] Walls
Field Value
| Type | Description |
|---|---|
| GameObject[] |