Skip to main content

SafetySpline

A class in Root.Township, the global namespace.

Forest generation part that adds a terrain spline along the side of a path edge where the ground drops away, probably as a safety barrier.

Constructors​

MemberWhat it is
SafetySpline()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private float extraRadiusExtra sideways distance beyond the edge's average radius for the spline. Default 2.
private float fallMinimumHeight drop needed on a side before the spline is added there. Default 10.

Methods​

MemberWhat it is
override void GenerateStatic(GenerationCore core, bool isModifyingTerrain)Checks the neighbouring paths at both ends of the edge and builds the spline offset to each side where the drop exceeds fallMinimum.