Connections define networks of values made up of feeders, passers and consumers.

water that spreads through pipes or the reach of services through roads

Similar to layers, types of connections are defined by creating a Connection asset from RMB/Create/CityBuilder/Connection. The Connection asset has Layer, Layer Range and Layer Falloff fields which allow the connection to act as a LayerAffector. The Urban Demo uses this for a water layer that spreads out from the connection. It also has a power connection that is directly used without a layer. For another simple example of connections check out the ConnectionPlayground in the CityBuilderCore.Tests folder.

Passers

The the most basic piece of a connection, theirs points pass on values and both feeders and consumers are just variants of passers. A ConnectionPasserStructure is used in the ConnectionPlayground to spread a connection through a road network(found by key). The same component also spreads power and water through StructureTiles in the urban demo. The houses in the urban demo have a ConnectionPasserComponent that spreads power through the buildings.

Consumers

Consumers are special passers that only receive value but don’t actually pass them further. In the ConnectionPlayground this is used so that only buildings directly connected to the road receive connection but not buildings that connect to them. They use a ConnectionPasserComponent for this with the IsConsumer field checked.

Feeders

Feeders are where values within connections spread out from. Both the urban demo and the playground use the ConnectionFeederComponent on buildings(pump, power station) but other components to feed from structures or tiles are also available. The feeder component has fields for the max value in the points of the feeder and the range and falloff in the connected passers.