ObjectPipeline
A class in Root.Township, the global namespace.
A serializable chain that turns an input object (usually a Distribution) into one result, such as picking a random prefab. Used by cave cluster generators and forest encounters.
- Listed in Global namespace: M to O
Constructors
| Member | What it is |
|---|---|
ObjectPipeline() | Creates an ObjectPipeline with default values. |
Fields
6 private and internal fields
Properties
| Member | What it is |
|---|---|
static PipelineElement[] Elements { get; } | The available steps: pick from a distribution, and flatten a distribution. |
bool HasInput { get; } | Whether an input object is set. |
Methods
| Member | What it is |
|---|---|
Object Get(SpawnData spawnData, string errorName = "Unknown") | Runs the chain and returns the result. Steps up to the cache depth run once and are reused. |
Object Get(Func<double> random, SpawnData spawnData, string errorName = "Unknown") | Runs the chain and returns the result. Steps up to the cache depth run once and are reused. |
IEnumerable<Object> GetAll() (iterator) | Lists every result each step could give for the input. |
void Reset() | Clears the cache so the next Get runs every step again. |
Used in
Members of other types that take, return or hold a ObjectPipeline:
ClusterGenerator.prefab, StaticClusterGenerator.prefab, ForestEncounters.crossRoads, ForestEncounters.deadEnds, ForestEncounters.largeEncounters, ForestEncounters.paths, RiverEncounters.exits, RiverEncounters.forks, RiverEncounters.openings, RiverEncounters.paths, RiverEncounters.waterfallTops, PresetLootSet.Entry.item, PresetLootSet.Entry.physicalMaterial, DynamicPathPart.prefab, GrowthStage.prefabs, GrowthStage.Prefabs, PopulationPath.population, RockCluster.options, SetNetworkPrefabModifier.prefab, SetPrefabModifier.piecePipeline, SetPrefabModifier.pipeline, SpawnerPart.prefab, SpawnInCircle.items, StaticDynamicSpawner.prefab, StaticGeneration.prefab, TerrainSpline.prefab.