SplatPainter
A class in Root.Township, Alta.Forests.
Paints terrain splat (texture) values during forest generation by running a SplatPaintSet's paint modifiers on each terrain point.
- Listed in World generation
- Inherits or implements
MonoBehaviour,ISplatPainter
Constructors
| Member | What it is |
|---|---|
SplatPainter() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private static Logger logger | NLog logger; logs errors thrown while painting. |
private SplatPaintSet paintSet | The paint set that decides where and how strongly to paint. |
Methods
| Member | What it is |
|---|---|
void Paint(ForestGeneration forest, Random rowRandom, TerrainAccess access, int x, int z, Vector2 position, ref SplatData data) | Rolls a fail score, runs the point through the modifiers and, if it passes, applies the paint with strength from the score left over. |