Class PathConstraint
Forces a network of tiles to connect with each other, so there is always a complete path between them. Two tiles connect along the path if:
- Both tiles are in pathTiles (if hasPathTiles set); and
- The central color of the sides of the tiles leading to each other are in pathColors (if pathColors set)
Note
This class is available only in Tessera Pro
Namespace: Tessera
Assembly: cs.temp.dll.dll
Syntax
public class PathConstraint : TesseraConstraint
Fields
acyclic
If set, bans all cycles, forcing a tree or forest.
Declaration
public bool acyclic
Field Value
Type | Description |
---|---|
Boolean |
connected
If Set, then the constraint forces that all path tiles must have a contiguous path between them.
Declaration
public bool connected
Field Value
Type | Description |
---|---|
Boolean |
hasPathColors
If set, pathColors is used to determine path tiles and sides.
Declaration
public bool hasPathColors
Field Value
Type | Description |
---|---|
Boolean |
hasPathTiles
If set, pathTiles is used to determine path tiles.
Declaration
public bool hasPathTiles
Field Value
Type | Description |
---|---|
Boolean |
loops
If set, forces there to be at least two non-overlapping valid paths between any two connected path tiles.
Declaration
public bool loops
Field Value
Type | Description |
---|---|
Boolean |
parity
Enable this if your path tileset includes no forks or junctions, it can improve the search quality.
Declaration
public bool parity
Field Value
Type | Description |
---|---|
Boolean |
pathColors
If hasPathColors, this set filters tiles that the path can connect through. Only the central square on each face is inspected.
Declaration
public List<int> pathColors
Field Value
Type | Description |
---|---|
List<Int32> |
pathTiles
If hasPathTiles, this set filters tiles that the path can connect through.
Declaration
public List<TesseraTileBase> pathTiles
Field Value
Type | Description |
---|---|
List<TesseraTileBase> |
prioritize
If set, the the generator will prefer generating tiles near the path.
Declaration
public bool prioritize
Field Value
Type | Description |
---|---|
Boolean |