Skip to main content

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.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private static Logger loggerNLog logger; logs errors thrown while painting.
private SplatPaintSet paintSetThe paint set that decides where and how strongly to paint.

Methods​

MemberWhat 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.