Skip to main content

GrassClump

A class in Root.Township, Alta.Environmental.Vegetation.

Picks a random mesh for a grass clump at start and writes height-based vertex colours for the wind shader.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private Mesh[] availableMeshesBacking field for AvailableMeshes.

Properties​

MemberWhat it is
Mesh[] AvailableMeshes { get; set; }Meshes to pick from.

Methods​

1 private and internal method
MemberWhat it is
private void Start()Picks a mesh, sets vertex colour red to half the vertex height (on the shared mesh) and turns shadows on.